]> granicus.if.org Git - vim/commitdiff
patch 8.0.1524: compiler warnings for uninitialized variables v8.0.1524
authorBram Moolenaar <Bram@vim.org>
Mon, 19 Feb 2018 20:50:42 +0000 (21:50 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 19 Feb 2018 20:50:42 +0000 (21:50 +0100)
Problem:    Compiler warnings for uninitialized variables. (Tony Mechelynck)
Solution:   Initialize variables.

src/terminal.c
src/version.c

index bcdc70025fe4116a4a3a2ee77236bffe1fa30b8c..0f9aa8640d38bde7d8bbde85c83cfec00314f197 100644 (file)
@@ -3277,9 +3277,9 @@ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff)
     char_u     buf1[NUMBUFLEN];
     char_u     buf2[NUMBUFLEN];
     char_u     *fname1;
-    char_u     *fname2;
+    char_u     *fname2 = NULL;
     FILE       *fd1;
-    FILE       *fd2;
+    FILE       *fd2 = NULL;
     char_u     *textline = NULL;
 
     /* First open the files.  If this fails bail out. */
@@ -3460,7 +3460,7 @@ term_load_dump(typval_T *argvars, typval_T *rettv, int do_diff)
 theend:
     vim_free(textline);
     fclose(fd1);
-    if (do_diff)
+    if (fd2 != NULL)
        fclose(fd2);
 }
 
index 11c5133911b56d2ecd5e553d02481ba2906df9ae..78b8431d1713930b9c8c01c1e85b8543189a2aa6 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1524,
 /**/
     1523,
 /**/