From 7656cd527bc22c9899f98d6a08a2b98de51d6f68 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 25 Aug 2022 13:00:07 +0800 Subject: vim-patch:8.2.1960: warning for uninitialized variable Problem: Warning for uninitialized variable. Solution: Initialize the variable. https://github.com/vim/vim/commit/0fd797eacd569a0680a86452c18713eacf6608fe --- src/nvim/eval/funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval/funcs.c') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 988300f6f2..fc926cf5a9 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -5714,7 +5714,7 @@ static void f_rand(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) // When no argument is given use the global seed list. if (!initialized) { // Initialize the global seed list. - uint32_t x; + uint32_t x = 0; init_srand(&x); gx = splitmix32(&x); -- cgit