]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4995: still a compiler warning for possibly uninitialized variable v8.2.4995
authorBram Moolenaar <Bram@vim.org>
Sat, 21 May 2022 20:55:55 +0000 (21:55 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 21 May 2022 20:55:55 +0000 (21:55 +0100)
Problem:    Still a compiler warning for possibly uninitialized variable.
            (Tony Mechelynck)
Solution:   Initialize variables.

src/version.c
src/vim9execute.c

index 6ea31dd3d99958f9ec3bd7fea326ec530d4e0a69..1a39c062552e6bac093ac1fa1a1874c1e44ea166 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4995,
 /**/
     4994,
 /**/
index eb07a38c30b386bb2032fd5d67890b8d94ff825c..b191dc998390bc713011523edf364eda50c3c1e4 100644 (file)
@@ -6279,8 +6279,8 @@ ex_disassemble(exarg_T *eap)
     char_u     *arg = eap->arg;
     ufunc_T    *ufunc;
     dfunc_T    *dfunc;
-    isn_T      *instr;
-    int                instr_count;
+    isn_T      *instr = NULL;  // init to shut up gcc warning
+    int                instr_count = 0;  // init to shut up gcc warning
     compiletype_T compile_type = CT_NONE;
 
     ufunc = find_func_by_name(arg, &compile_type);