]> granicus.if.org Git - vim/commitdiff
patch 8.2.2333: Vim9: warning for uninitialized variable v8.2.2333
authorBram Moolenaar <Bram@vim.org>
Tue, 12 Jan 2021 16:17:01 +0000 (17:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 12 Jan 2021 16:17:01 +0000 (17:17 +0100)
Problem:    Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize "res".

src/version.c
src/vim9execute.c

index 464154f33f4d45204c917de16b7553776a774d0f..390c1f92f0723729759dcdfc400c34115f41b795 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2333,
 /**/
     2332,
 /**/
index be06d89ac56fdadeab4666b740516900bd8cdb49..7c4ef2a92c030f60bc4738f60f09c3f91902986e 100644 (file)
@@ -754,7 +754,7 @@ call_partial(typval_T *tv, int argcount_arg, ectx_T *ectx)
     int                argcount = argcount_arg;
     char_u     *name = NULL;
     int                called_emsg_before = called_emsg;
-    int                res;
+    int                res = FAIL;
 
     if (tv->v_type == VAR_PARTIAL)
     {
@@ -800,7 +800,7 @@ call_partial(typval_T *tv, int argcount_arg, ectx_T *ectx)
        vim_free(tofree);
     }
 
-    if (name == NULL || res == FAIL)
+    if (res == FAIL)
     {
        if (called_emsg == called_emsg_before)
            semsg(_(e_unknownfunc),