]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4468: Coverity warns for uninitialized struct member v8.2.4468
authorBram Moolenaar <Bram@vim.org>
Fri, 25 Feb 2022 20:48:26 +0000 (20:48 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 25 Feb 2022 20:48:26 +0000 (20:48 +0000)
Problem:    Coverity warns for uninitialized struct member.
Solution:   Set color.index to zero.

src/terminal.c
src/version.c

index 43a216f951af02eccce2e2cad74ceb57295f33bb..75f7a08aae149a36233c48559535e20251bae97b 100644 (file)
@@ -4193,6 +4193,7 @@ set_vterm_palette(VTerm *vterm, long_u *rgb)
        color.red = (unsigned)(rgb[index] >> 16);
        color.green = (unsigned)(rgb[index] >> 8) & 255;
        color.blue = (unsigned)rgb[index] & 255;
+       color.index = 0;
        vterm_state_set_palette_color(state, index, &color);
     }
 }
index d82fff51a32905688c9998ea1ed252ee90bf28b1..86a78082427c36ac5454a2bbd0fb25ac23bd20a3 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4468,
 /**/
     4467,
 /**/