]> granicus.if.org Git - vim/commitdiff
patch 8.2.1960: warning for uninitialized variable v8.2.1960
authorBram Moolenaar <Bram@vim.org>
Thu, 5 Nov 2020 19:46:32 +0000 (20:46 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 Nov 2020 19:46:32 +0000 (20:46 +0100)
Problem:    Warning for uninitialized variable.
Solution:   Initialize the variable.

src/evalfunc.c
src/version.c

index 74985c2db7e86e83dfea5cfa6c9853011d02fc38..5cc9ad75511693a56b405bc90e00e214ec5627aa 100644 (file)
@@ -6873,7 +6873,7 @@ f_rand(typval_T *argvars, typval_T *rettv)
     static UINT32_T    gx, gy, gz, gw;
     static int initialized = FALSE;
     listitem_T *lx, *ly, *lz, *lw;
-    UINT32_T   x, y, z, w, t, result;
+    UINT32_T   x = 0, y, z, w, t, result;
 
     if (argvars[0].v_type == VAR_UNKNOWN)
     {
index f5d94cc724c9a9dc50dbf7c210af4e764540d2cc..067377ee3eb50dc5bbc4d03668fba4cb00e15274 100644 (file)
@@ -750,6 +750,10 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1960,
+/**/
+    1959,
 /**/
     1959,
 /**/