vim-patch:8.0.0223

Problem:    Coverity gets confused by the flags passed to find_tags() and
            warnts for an uninitialized variable.
Solution:   Disallow using cscope and help tags at the same time.

fffbf308dd
This commit is contained in:
James McCoy
2017-03-19 15:08:26 -04:00
parent e1af49b425
commit d3f15f1e6d

View File

@@ -1057,6 +1057,7 @@ static void prepare_pats(pat_T *pats, int has_re)
* TAG_REGEXP use "pat" as a regexp
* TAG_NOIC don't always ignore case
* TAG_KEEP_LANG keep language
* TAG_CSCOPE use cscope results for tags
*/
int
find_tags (
@@ -1189,6 +1190,11 @@ find_tags (
*/
if (help_only) /* want tags from help file */
curbuf->b_help = true; /* will be restored later */
else if (use_cscope) {
// Make sure we don't mix help and cscope, confuses Coverity.
help_only = false;
curbuf->b_help = false;
}
orgpat.len = (int)STRLEN(pat);
if (curbuf->b_help) {