summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-04 14:50:32 +0200
commit8d4ed11da635a1abe0ef2d795b4d48824c54d0e7 (patch)
tree2e6e32cb89174e28967a9cd9a9408c99c884a609
parentcde0ff39da2459b16007fef701ebaa449fb6fe9d (diff)
downloadvim-git-8d4ed11da635a1abe0ef2d795b4d48824c54d0e7.tar.gz
patch 8.2.0510: Coverity complains about using uninitialized variablev8.2.0510
Problem: Coverity complains about using uninitialized variable. Solution: Assign a value to "scol". Move code inside NULL check.
-rw-r--r--src/beval.c2
-rw-r--r--src/popupwin.c20
-rw-r--r--src/version.c2
3 files changed, 14 insertions, 10 deletions
diff --git a/src/beval.c b/src/beval.c
index 63aaf1376..6b10a654d 100644
--- a/src/beval.c
+++ b/src/beval.c
@@ -110,6 +110,8 @@ find_word_under_cursor(
lbuf = vim_strnsave(lbuf, len);
}
}
+ else
+ scol = col;
if (winp != NULL)
*winp = wp;
diff --git a/src/popupwin.c b/src/popupwin.c
index 3a0dcb96a..608db4c09 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -798,16 +798,16 @@ apply_general_options(win_T *wp, dict_T *dict)
if (*str != NUL)
wp->w_border_char[i] = mb_ptr2char(str);
}
- }
- if (list->lv_len == 1)
- for (i = 1; i < 8; ++i)
- wp->w_border_char[i] = wp->w_border_char[0];
- if (list->lv_len == 2)
- {
- for (i = 4; i < 8; ++i)
- wp->w_border_char[i] = wp->w_border_char[1];
- for (i = 1; i < 4; ++i)
- wp->w_border_char[i] = wp->w_border_char[0];
+ if (list->lv_len == 1)
+ for (i = 1; i < 8; ++i)
+ wp->w_border_char[i] = wp->w_border_char[0];
+ if (list->lv_len == 2)
+ {
+ for (i = 4; i < 8; ++i)
+ wp->w_border_char[i] = wp->w_border_char[1];
+ for (i = 1; i < 4; ++i)
+ wp->w_border_char[i] = wp->w_border_char[0];
+ }
}
}
}
diff --git a/src/version.c b/src/version.c
index 34553c60a..122dcc881 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 510,
+/**/
509,
/**/
508,