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.
diff --git a/src/drawline.c b/src/drawline.c
index 76176ab..666e32d 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -1486,7 +1486,7 @@
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 @@
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)
{