summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-26 11:42:34 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-26 11:42:34 +0100
commitbe3dbda871ffd1b61f52b9519c23772f62381c67 (patch)
treeb9f61aa6bd2bfbe1e886f9ac7c4807d076c278fb
parent34a1f779791fd4137547fa72addeb147b7704604 (diff)
downloadvim-git-be3dbda871ffd1b61f52b9519c23772f62381c67.tar.gz
patch 9.0.0075: some compilers warn for using an uninitialized variablev9.0.0075
Problem: Some compilers warn for using an uninitialized variable. (Tony Mechelynck) Solution: Initialize the variable.
-rw-r--r--src/drawline.c4
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/drawline.c b/src/drawline.c
index 76176ab24..666e32d1c 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -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)
{
diff --git a/src/version.c b/src/version.c
index f7cbaf81b..1909fd4b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 75,
+/**/
74,
/**/
73,