]> granicus.if.org Git - vim/commitdiff
patch 8.2.1670: a couple of gcc compiler warnings v8.2.1670
authorBram Moolenaar <Bram@vim.org>
Sat, 12 Sep 2020 19:04:23 +0000 (21:04 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 12 Sep 2020 19:04:23 +0000 (21:04 +0200)
Problem:    A couple of gcc compiler warnings.
Solution:   Initialize local variables. (Dominique PellĂ©, closes #6944)

src/memline.c
src/option.c
src/version.c

index 1c594d453a8ad144befbf5bb4a0a9c88c0deae2a..54f8c19b0f866ae49e05770f5563c7090fdfc9c5 100644 (file)
@@ -2634,7 +2634,7 @@ add_text_props_for_append(
     int                n;
     char_u     *props;
     int                new_len = 0;  // init for gcc
-    char_u     *new_line;
+    char_u     *new_line = NULL;
     textprop_T prop;
 
     // Make two rounds:
index 6ebc2bd9b5efd268ecafe9df1146e57d08dfc89b..dbb086df14937d71972925f1016d8f4a5a6cfadc 100644 (file)
@@ -683,7 +683,7 @@ set_string_default(char *name, char_u *val)
     static char_u *
 find_dup_item(char_u *origval, char_u *newval, long_u flags)
 {
-    int            bs;
+    int            bs = 0;
     size_t  newlen;
     char_u  *s;
 
index 4f8b503dd703913c23bcf91070df349725af7168..b819c6d751148f4502a1a654cb8c7a8c2f14409f 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1670,
 /**/
     1669,
 /**/