summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-08-11 18:53:03 +0200
committerBram Moolenaar <Bram@vim.org>2015-08-11 18:53:03 +0200
commitbd8539aac385d265d41da2e8ab59d7b9c3694557 (patch)
tree6edd23be4bfd095e3e15d46eeb61c395bbd4ace6
parent8fee878fe277ec1b1b833ba6e5db679151f7982f (diff)
downloadvim-git-bd8539aac385d265d41da2e8ab59d7b9c3694557.tar.gz
patch 7.4.821v7.4.821
Problem: Coverity reports a few problems. Solution: Avoid the warnings. (Christian Brabandt)
-rw-r--r--src/ex_docmd.c3
-rw-r--r--src/option.c2
-rw-r--r--src/screen.c2
-rw-r--r--src/version.c2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 13ed6b0a1..7633d5420 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4520,6 +4520,9 @@ get_address(ptr, addr_type, skip, to_other_file)
pos.col = MAXCOL;
else
pos.col = 0;
+#ifdef FEAT_VIRTUALEDIT
+ pos.coladd = 0;
+#endif
if (searchit(curwin, curbuf, &pos,
*cmd == '?' ? BACKWARD : FORWARD,
(char_u *)"", 1L, SEARCH_MSG,
diff --git a/src/option.c b/src/option.c
index 8e5021cd6..f3e4e20fb 100644
--- a/src/option.c
+++ b/src/option.c
@@ -9990,6 +9990,8 @@ unset_global_local_option(name, from)
buf_T *buf = (buf_T *)from;
opt_idx = findoption(name);
+ if (opt_idx < 0)
+ return;
p = &(options[opt_idx]);
switch ((int)p->indir)
diff --git a/src/screen.c b/src/screen.c
index ba964b495..b1af862d3 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7801,7 +7801,7 @@ next_search_hl_pos(shl, lnum, posmatch, mincol)
}
}
posmatch->cur = 0;
- if (shl->lnum == lnum)
+ if (shl->lnum == lnum && bot >= 0)
{
colnr_T start = posmatch->pos[bot].col == 0
? 0 : posmatch->pos[bot].col - 1;
diff --git a/src/version.c b/src/version.c
index f8ef512dd..09eceabdc 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 821,
+/**/
820,
/**/
819,