]> granicus.if.org Git - vim/commitdiff
patch 8.1.0376: compiler warning for uninitialized variable v8.1.0376
authorBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2018 12:57:41 +0000 (14:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 13 Sep 2018 12:57:41 +0000 (14:57 +0200)
Problem:    Compiler warning for uninitialized variable. (Tony Mechelynck)
Solution:   Initialize the variable.

src/screen.c
src/version.c

index 2586ad03c06ba689f4c39db96bd953a503ea3e4d..51f53c311b039ca267a70a2f88f6294502c1bce5 100644 (file)
@@ -3147,7 +3147,7 @@ win_line(
     static linenr_T capcol_lnum = 0;   /* line number where "cap_col" used */
     int                cur_checked_col = 0;    /* checked column for current line */
 #endif
-    int                extra_check;            /* has syntax or linebreak */
+    int                extra_check = 0;        // has syntax or linebreak
 #ifdef FEAT_MBYTE
     int                multi_attr = 0;         /* attributes desired by multibyte */
     int                mb_l = 1;               /* multi-byte byte length */
@@ -3271,8 +3271,6 @@ win_line(
         */
 #ifdef FEAT_LINEBREAK
        extra_check = wp->w_p_lbr;
-#else
-       extra_check = 0;
 #endif
 #ifdef FEAT_SYN_HL
        if (syntax_present(wp) && !wp->w_s->b_syn_error
index c1033391266c57479f2c5c5a6c87c3622f55ebb0..89a134bf8234685e5522247b8b69b3d1dcd5a458 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    376,
 /**/
     375,
 /**/