Mercurial > vim
comparison src/option.c @ 2445:04dae202d316 vim73
Fixes for coverity warnings.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 31 Jul 2010 16:44:19 +0200 |
parents | a3aca345aafa |
children | a8a010cdd71b |
comparison
equal
deleted
inserted
replaced
2444:3fbd9bce03f1 | 2445:04dae202d316 |
---|---|
3210 if (opt_idx >= 0) | 3210 if (opt_idx >= 0) |
3211 { | 3211 { |
3212 options[opt_idx].def_val[VI_DEFAULT] = buf; | 3212 options[opt_idx].def_val[VI_DEFAULT] = buf; |
3213 options[opt_idx].flags |= P_DEF_ALLOCED; | 3213 options[opt_idx].flags |= P_DEF_ALLOCED; |
3214 } | 3214 } |
3215 else | |
3216 vim_free(buf); /* cannot happen */ | |
3215 } | 3217 } |
3216 if (mustfree) | 3218 if (mustfree) |
3217 vim_free(cdpath); | 3219 vim_free(cdpath); |
3218 } | 3220 } |
3219 } | 3221 } |
4260 #ifdef FEAT_DIFF | 4262 #ifdef FEAT_DIFF |
4261 /* In diff mode some options are overruled. This avoids that | 4263 /* In diff mode some options are overruled. This avoids that |
4262 * 'foldmethod' becomes "marker" instead of "diff" and that | 4264 * 'foldmethod' becomes "marker" instead of "diff" and that |
4263 * "wrap" gets set. */ | 4265 * "wrap" gets set. */ |
4264 if (curwin->w_p_diff | 4266 if (curwin->w_p_diff |
4267 && opt_idx >= 0 /* shut up coverity warning */ | |
4265 && (options[opt_idx].indir == PV_FDM | 4268 && (options[opt_idx].indir == PV_FDM |
4266 || options[opt_idx].indir == PV_WRAP)) | 4269 || options[opt_idx].indir == PV_WRAP)) |
4267 goto skip; | 4270 goto skip; |
4268 #endif | 4271 #endif |
4269 } | 4272 } |