]> granicus.if.org Git - vim/commitdiff
patch 8.0.1443: compiler complains about uninitialized variable v8.0.1443
authorBram Moolenaar <Bram@vim.org>
Wed, 31 Jan 2018 13:25:53 +0000 (14:25 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 31 Jan 2018 13:25:53 +0000 (14:25 +0100)
Problem:    Compiler complains about uninitialized variable. (Tony Mechelynck)
Solution:   Assign a value to the variable.

src/undo.c
src/version.c

index d2ac457cfabde566b800f01f35ba796f459fed7c..0297e3f661d1ba380493019e16bda39ba53d858b 100644 (file)
@@ -2364,7 +2364,10 @@ undo_time(
 
     /* When "target" is 0; Back to origin. */
     if (target == 0)
-       goto found;
+    {
+       mark = lastmark;  /* avoid that GCC complains */
+       goto target_zero;
+    }
 
     /*
      * May do this twice:
@@ -2491,7 +2494,7 @@ undo_time(
            above = TRUE;       /* stop above the header */
     }
 
-found:
+target_zero:
     /* If we found it: Follow the path to go to where we want to be. */
     if (uhp != NULL || target == 0)
     {
index 43e89a284784aaeef5c5280d6b287e265a27a351..2c0306d6d957e58d57ab476facae3629f874fd29 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1443,
 /**/
     1442,
 /**/