]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.5017: gcc 12.1 warns for uninitialized variable v8.2.5017
authormityu <mityu.mail@gmail.com>
Wed, 25 May 2022 16:29:46 +0000 (17:29 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 25 May 2022 16:29:46 +0000 (17:29 +0100)
Problem:    Gcc 12.1 warns for uninitialized variable.
Solution:   Initialize the variable. (closes #10476)

src/evalvars.c
src/version.c

index e83c50dff2996f0ddeebed831c31d263f4c3371d..f7939cbb7aedb0b61a7a4d437db5618c2225a0e8 100644 (file)
@@ -2023,7 +2023,7 @@ do_unlet(char_u *name, int forceit)
 {
     hashtab_T  *ht;
     hashitem_T *hi;
-    char_u     *varname;
+    char_u     *varname = NULL;  // init to shut up gcc
     dict_T     *d;
     dictitem_T *di;
 
index 250b73e7afff9f5cbccb7a59e1c89157df794efb..980ddff73127cfff01495af7e4d6ffe5a4c25ee8 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5017,
 /**/
     5016,
 /**/