Patch 8.2.3755

6 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 7, 2021, 6:04:19 AM12/7/21
to vim...@googlegroups.com

Patch 8.2.3755
Problem: Coverity warns for using a buffer in another scope.
Solution: Declare the buffer in a common scope.
Files: src/evalvars.c


*** ../vim-8.2.3754/src/evalvars.c 2021-12-06 11:03:50.946900217 +0000
--- src/evalvars.c 2021-12-07 11:01:53.632451487 +0000
***************
*** 1393,1398 ****
--- 1393,1400 ----
int failed = FALSE;
int opt_p_flags;
char_u *tofree = NULL;
+ char_u numbuf[NUMBUFLEN];
+

c1 = *p;
*p = NUL;
***************
*** 1416,1427 ****
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.
--- 1418,1426 ----
*** ../vim-8.2.3754/src/version.c 2021-12-06 19:50:57.706620019 +0000
--- src/version.c 2021-12-07 11:02:37.484353805 +0000
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 3755,
/**/

--
An operatingsystem is just a name you give to the rest of bloating
idiosyncratic machine-based-features you left out of your editor.
(author unknown)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages