diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-12 17:17:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-12 17:17:01 +0100 |
commit | cb6cbf29e97b7abdeb1e6cbdc5e735f5b55e97a1 (patch) | |
tree | 86eba55217414a5da1596a63dfc32d802ec28962 | |
parent | 9567efa1b4a41baca9b2266f5903d5dda7ad1e88 (diff) | |
download | vim-git-cb6cbf29e97b7abdeb1e6cbdc5e735f5b55e97a1.tar.gz |
patch 8.2.2333: Vim9: warning for uninitialized variablev8.2.2333
Problem: Vim9: warning for uninitialized variable. (Tony Mechelynck)
Solution: Initialize "res".
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9execute.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/version.c b/src/version.c index 464154f33..390c1f92f 100644 --- 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 index be06d89ac..7c4ef2a92 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -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), |