Mercurial > vim
changeset 7007:5ea5bd9c18d2 v7.4.821
patch 7.4.821
Problem: Coverity reports a few problems.
Solution: Avoid the warnings. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Aug 2015 18:53:03 +0200 |
parents | 1520ad7bad2f |
children | 7ce1f4e998bb |
files | src/ex_docmd.c src/option.c src/screen.c src/version.c |
diffstat | 4 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4520,6 +4520,9 @@ get_address(ptr, addr_type, skip, to_oth 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,
--- 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)