forked from aniani/vim
Fixes for coverity warnings.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user