]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4470: Coverity warns for uninitialized variable v8.2.4470
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Feb 2022 21:05:36 +0000 (21:05 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Feb 2022 21:05:36 +0000 (21:05 +0000)
Problem:    Coverity warns for uninitialized variable.
Solution:   Set can_spell to zero.

src/drawline.c
src/version.c

index 51dcfb1bb9e0477e3de835bbf94287f59eb3e1a8..a55c06dc97e41ed23cf276fdc9970a40c5e01f00 100644 (file)
@@ -330,7 +330,7 @@ win_line(
 #endif
 #ifdef FEAT_SPELL
     int                has_spell = FALSE;      // this buffer has spell checking
-    int                can_spell;
+    int                can_spell = FALSE;
 # define SPWORDLEN 150
     char_u     nextline[SPWORDLEN * 2];// text with start of the next line
     int                nextlinecol = 0;        // column where nextline[] starts
index 0889ac4d02d7bf5db0f4aa67e75f6eb4fdefcae0..ccd281a5d0e0b0e03c50727830bf2c2f8f5a3369 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4470,
 /**/
     4469,
 /**/