]> granicus.if.org Git - vim/commitdiff
patch 8.2.0566: Vim9: variable can be used uninitialized v8.2.0566
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Apr 2020 21:09:25 +0000 (23:09 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Apr 2020 21:09:25 +0000 (23:09 +0200)
Problem:    Vim9: variable can be used uninitialized.
Solution:   Jump to after where variable is used.

src/version.c
src/vim9execute.c

index 2e2a4d051a164b5e772ac6f887793e0b95d8c812..35f8df8e800bed0bf2589d0af33b2e65527fc0cd 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    566,
 /**/
     565,
 /**/
index 4ac760e66d4fcb30c74fb15b6c3452eec37c715b..cddb9d2137f9af66f6cbef7fda9e260831de8f7f 100644 (file)
@@ -524,7 +524,7 @@ call_def_function(
        else
            argc -= vararg_count;
        if (exe_newlist(vararg_count, &ectx) == FAIL)
-           goto failed;
+           goto failed_early;
        if (defcount > 0)
            // Move varargs list to below missing default arguments.
            *STACK_TV_BOT(defcount- 1) = *STACK_TV_BOT(-1);
@@ -1773,7 +1773,7 @@ failed:
     // When failed need to unwind the call stack.
     while (ectx.ec_frame != initial_frame_ptr)
        func_return(&ectx);
-
+failed_early:
     for (idx = 0; idx < ectx.ec_stack.ga_len; ++idx)
        clear_tv(STACK_TV(idx));
     vim_free(ectx.ec_stack.ga_data);