]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0099: compiler warning about unused variable v9.2.0099
authorChristian Brabandt <cb@256bit.org>
Tue, 3 Mar 2026 18:37:25 +0000 (18:37 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 3 Mar 2026 18:37:25 +0000 (18:37 +0000)
Problem:  Coverity complains about uninitialized var, also gcc warns
          about a few other variables possibly being used uninitialized
          (Tony Mechelynck, after v9.2.0093)
Solution: Initialize a few other variables.

Coverity CID: 1683101

closes: #19561

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/highlight.c
src/screen.c
src/term.c
src/version.c

index 5ce3ea107b6c4c628c703c4911266ae206313424..b22cda58703c0940cc94a6d638911ae835ff102f 100644 (file)
@@ -4294,6 +4294,7 @@ highlight_changed(void)
            // Allow several hl_flags to be combined, like "bu" for
            // bold-underlined.
            attr = 0;
+           id = 0;
            for ( ; *p && *p != ','; ++p)           // parse up to comma
            {
                if (VIM_ISWHITE(*p))                // ignore white space
index 316b18b207714bc4fcbab93baf600aa747338036..6a062ca263c0b6b805b3657e85ae74a085446387 100644 (file)
@@ -4564,8 +4564,8 @@ draw_tabline(void)
     int                c;
     int                len;
     int                attr_sel;
-    int                attr_nosel;
-    int                attr_fill;
+    int                attr_nosel = 0;
+    int                attr_fill = 0;
     char_u     *p;
     int                room;
     int                use_sep_chars = (t_colors < 8
index 026a12ecda069459f90965a8b5503157c2f35d6e..39f63fa954794387406d4cd0d81958c22432ec63 100644 (file)
@@ -6257,7 +6257,7 @@ check_termcode(
        {
            int  mouse_index_found = -1;
            int keypad_index_found = -1;
-           int keypad_slen_found;
+           int keypad_slen_found = 0;
 
            for (idx = 0; idx < tc_len; ++idx)
            {
index dd38ef7d9c68ec812692d118dd3de5bea7f41561..f2e546cb1acea2620a54b6a73f385cf14fd6e6ba 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    99,
 /**/
     98,
 /**/