]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4878: valgrind warning for using uninitialized variable v8.2.4878
authorBram Moolenaar <Bram@vim.org>
Fri, 6 May 2022 10:02:05 +0000 (11:02 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 6 May 2022 10:02:05 +0000 (11:02 +0100)
Problem:    Valgrind warning for using uninitialized variable.
Solution:   Initialize the type of newtv.

src/strings.c
src/version.c

index 7a99cd96425fdbc63785dc4076c1079c05a523e9..0313e7480eaf3d4e07111514041c0895bc0bc0d5 100644 (file)
@@ -898,6 +898,7 @@ string_filter_map(
            break;
        len = (int)STRLEN(tv.vval.v_string);
 
+       newtv.v_type = VAR_UNKNOWN;
        set_vim_var_nr(VV_KEY, idx);
        if (filter_map_one(&tv, expr, filtermap, &newtv, &rem) == FAIL
                || did_emsg)
index e3aa288af92e9f50f0acfc2e84ab01f0433b273d..30f420bdd339a508a9d66166ed800ede7a23bc68 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4878,
 /**/
     4877,
 /**/