]> granicus.if.org Git - vim/commitdiff
patch 7.4.821 v7.4.821
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 16:53:03 +0000 (18:53 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 16:53:03 +0000 (18:53 +0200)
Problem:    Coverity reports a few problems.
Solution:   Avoid the warnings. (Christian Brabandt)

src/ex_docmd.c
src/option.c
src/screen.c
src/version.c

index 13ed6b0a1d638708a4a8ba57f57f194359e8658d..7633d54200146d67202befafab9146077a5c5857 100644 (file)
@@ -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,
index 8e5021cd68667218468d7e0422225132cc3a6d00..f3e4e20fb43c46487edc4ea6320017e76d7944f4 100644 (file)
@@ -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)
index ba964b49588c0a8e5b5df5bf01c2c294aeea7204..b1af862d378f10232ba65eadddf3e46dcccd1836 100644 (file)
@@ -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;
index f8ef512dd3c5b6cac0b29bf6e3d8b6529e4ee396..09eceabdc998ea239510f91542121d1612d7bd5e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    821,
 /**/
     820,
 /**/