0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

patch 9.0.0075: some compilers warn for using an uninitialized variable

Problem:    Some compilers warn for using an uninitialized variable. (Tony
            Mechelynck)
Solution:   Initialize the variable.
This commit is contained in:
Bram Moolenaar 2022-07-26 11:42:34 +01:00
parent 34a1f77979
commit be3dbda871
2 changed files with 4 additions and 2 deletions

View File

@ -1486,7 +1486,7 @@ win_line(
text_prop_id = 0;
if (text_props_active > 0)
{
int used_tpi;
int used_tpi = -1;
int used_attr = 0;
// Sort the properties on priority and/or starting last.
@ -1514,7 +1514,7 @@ win_line(
used_tpi = tpi;
}
}
if (n_extra == 0 && text_prop_id < 0
if (n_extra == 0 && text_prop_id < 0 && used_tpi >= 0
&& -text_prop_id
<= wp->w_buffer->b_textprop_text.ga_len)
{

View File

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