vim-patch:8.2.4878: valgrind warning for using uninitialized variable

Problem:    Valgrind warning for using uninitialized variable.
Solution:   Initialize the type of newtv.

dd7eff0a75

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Jan Edmund Lazo
2025-10-11 10:30:56 -04:00
parent 90b1202cfb
commit b6d0c391fc

View File

@@ -235,7 +235,9 @@ static void filter_map_string(const char *str, filtermap_T filtermap, typval_T *
};
set_vim_var_nr(VV_KEY, idx);
typval_T newtv;
typval_T newtv = {
.v_type = VAR_UNKNOWN,
};
bool rem;
if (filter_map_one(&tv, expr, filtermap, &newtv, &rem) == FAIL
|| did_emsg) {