summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-07 11:03:39 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-07 11:03:39 +0000
commit92c33eb2735045d25fceed3b607f44d7156c59c1 (patch)
tree1749f5d6a28abfc1b2d019eaffb8bf814d329f69
parentecabb511074b3f56cdd5067553c947a291d04e17 (diff)
downloadvim-git-92c33eb2735045d25fceed3b607f44d7156c59c1.tar.gz
patch 8.2.3755: Coverity warns for using a buffer in another scopev8.2.3755
Problem: Coverity warns for using a buffer in another scope. Solution: Declare the buffer in a common scope.
-rw-r--r--src/evalvars.c5
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index f5465cfb7..60df7238f 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1393,6 +1393,8 @@ ex_let_option(
int failed = FALSE;
int opt_p_flags;
char_u *tofree = NULL;
+ char_u numbuf[NUMBUFLEN];
+
c1 = *p;
*p = NUL;
@@ -1416,12 +1418,9 @@ ex_let_option(
if (opt_p_flags & P_FUNC && (tv->v_type == VAR_PARTIAL
|| tv->v_type == VAR_FUNC))
{
- char_u numbuf[NUMBUFLEN];
-
// If the option can be set to a function reference or a lambda
// and the passed value is a function reference, then convert it to
// the name (string) of the function reference.
-
s = tv2string(tv, &tofree, numbuf, 0);
}
// Avoid setting a string option to the text "v:false" or similar.
diff --git a/src/version.c b/src/version.c
index d0ccf1688..294547b86 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3755,
+/**/
3754,
/**/
3753,