]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0966: some compilers don't allow a declaration after a label v9.0.0966
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Nov 2022 19:11:02 +0000 (19:11 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Nov 2022 19:11:02 +0000 (19:11 +0000)
Problem:    Some compilers don't allow a declaration after a label.
Solution:   Move the declaration to the start of the block. (John Marriott)

src/screen.c
src/version.c

index 7c3a6d7b0660eaf8653ecb5d7a281b5c6f326ada..3bf15d6c85161a6a8f2ca093591a4ce95dd04ebe 100644 (file)
@@ -2383,6 +2383,7 @@ screenalloc(int doclear)
     static int     entered = FALSE;            // avoid recursiveness
     static int     done_outofmem_msg = FALSE;  // did outofmem message
     int                    retry_count = 0;
+    int                    found_null;
 
 retry:
     /*
@@ -2509,8 +2510,7 @@ retry:
 #endif
 
 give_up:
-
-    int found_null = FALSE;
+    found_null = FALSE;
     for (int i = 0; i < p_mco; ++i)
        if (new_ScreenLinesC[i] == NULL)
        {
index 8d51ea702a7d80449951b32abee3ac392da42e14..240def4532fc31d270d4adac13613b648941d550 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    966,
 /**/
     965,
 /**/