# HG changeset patch # User Bram Moolenaar # Date 1610469005 -3600 # Node ID b875bbd517a6a35b9aa47ad220b2879fc0fd5b60 # Parent f8909b1d357562c4ab683c894055eb7526e762e1 patch 8.2.2333: Vim9: warning for uninitialized variable Commit: https://github.com/vim/vim/commit/cb6cbf29e97b7abdeb1e6cbdc5e735f5b55e97a1 Author: Bram Moolenaar 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". diff --git a/src/version.c b/src/version.c --- 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, diff --git a/src/vim9execute.c b/src/vim9execute.c --- 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),