From b6d0c391fc121051e559d2a962b03ea5140f7cd0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 11 Oct 2025 10:30:56 -0400 Subject: [PATCH] vim-patch:8.2.4878: valgrind warning for using uninitialized variable Problem: Valgrind warning for using uninitialized variable. Solution: Initialize the type of newtv. https://github.com/vim/vim/commit/dd7eff0a755c40eb88b494b98ac1a24f858ba880 Co-authored-by: Bram Moolenaar --- src/nvim/eval/list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvim/eval/list.c b/src/nvim/eval/list.c index 201e5ed7d2..76ddd77cbe 100644 --- a/src/nvim/eval/list.c +++ b/src/nvim/eval/list.c @@ -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) {