0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.4468: Coverity warns for uninitialized struct member

Problem:    Coverity warns for uninitialized struct member.
Solution:   Set color.index to zero.
This commit is contained in:
Bram Moolenaar
2022-02-25 20:48:26 +00:00
parent 0e71b7d4ce
commit 68afde4c9b
2 changed files with 3 additions and 0 deletions

View File

@@ -4193,6 +4193,7 @@ set_vterm_palette(VTerm *vterm, long_u *rgb)
color.red = (unsigned)(rgb[index] >> 16); color.red = (unsigned)(rgb[index] >> 16);
color.green = (unsigned)(rgb[index] >> 8) & 255; color.green = (unsigned)(rgb[index] >> 8) & 255;
color.blue = (unsigned)rgb[index] & 255; color.blue = (unsigned)rgb[index] & 255;
color.index = 0;
vterm_state_set_palette_color(state, index, &color); vterm_state_set_palette_color(state, index, &color);
} }
} }

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
4468,
/**/ /**/
4467, 4467,
/**/ /**/