]> granicus.if.org Git - vim/commitdiff
patch 8.2.3527: gcc complains about uninitialized variable v8.2.3527
authorBram Moolenaar <Bram@vim.org>
Sun, 17 Oct 2021 10:33:47 +0000 (11:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 17 Oct 2021 10:33:47 +0000 (11:33 +0100)
Problem:    Gcc complains about uninitialized variable. (Tony Mechelynck)
Solution:   Initialize it.

src/gui_gtk_x11.c
src/version.c

index c55d9792bbef51ecedc5b3d73d6ccbafb4b3b70a..e107c5e06080415e84684c3c2a33c64d41fef903 100644 (file)
@@ -5605,7 +5605,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags)
     int                byte_sum;       // byte position in string
     char_u     *cs;            // current *s pointer
     int                needs_pango;    // look ahead, 0=ascii 1=unicode/ligatures
-    int                should_need_pango;
+    int                should_need_pango = FALSE;
     int                slen;
     int                is_ligature;
     int                next_is_ligature;
@@ -5743,6 +5743,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags)
                slen++; // ascii
            }
        }
+
        // temporarily zero terminate substring, print, restore char, wrap
        backup_ch = *(cs + slen);
        *(cs + slen) = 0;
index 3b78cc808f16893a6fb731082ea03374f04f1139..3013dfc2cee2eb0d91a5522f4696694bf8e3d6ce 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3527,
 /**/
     3526,
 /**/