1
0
forked from aniani/vim

Fixes for coverity warnings.

This commit is contained in:
Bram Moolenaar
2010-07-31 16:44:19 +02:00
parent a26559b553
commit a9d52e3b79
11 changed files with 25 additions and 22 deletions

View File

@@ -3212,6 +3212,8 @@ set_init_1()
options[opt_idx].def_val[VI_DEFAULT] = buf;
options[opt_idx].flags |= P_DEF_ALLOCED;
}
else
vim_free(buf); /* cannot happen */
}
if (mustfree)
vim_free(cdpath);
@@ -4262,6 +4264,7 @@ do_set(arg, opt_flags)
* 'foldmethod' becomes "marker" instead of "diff" and that
* "wrap" gets set. */
if (curwin->w_p_diff
&& opt_idx >= 0 /* shut up coverity warning */
&& (options[opt_idx].indir == PV_FDM
|| options[opt_idx].indir == PV_WRAP))
goto skip;