changeset 23582:b875bbd517a6 v8.2.2333

patch 8.2.2333: Vim9: warning for uninitialized variable Commit: https://github.com/vim/vim/commit/cb6cbf29e97b7abdeb1e6cbdc5e735f5b55e97a1 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 12 17:17:01 2021 +0100 patch 8.2.2333: Vim9: warning for uninitialized variable Problem: Vim9: warning for uninitialized variable. (Tony Mechelynck) Solution: Initialize "res".
author Bram Moolenaar <Bram@vim.org>
date Tue, 12 Jan 2021 17:30:05 +0100
parents f8909b1d3575
children ea8ba4b1f97f
files src/version.c src/vim9execute.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2333,
+/**/
     2332,
 /**/
     2331,
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -754,7 +754,7 @@ call_partial(typval_T *tv, int argcount_
     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_
 	vim_free(tofree);
     }
 
-    if (name == NULL || res == FAIL)
+    if (res == FAIL)
     {
 	if (called_emsg == called_emsg_before)
 	    semsg(_(e_unknownfunc),