aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-03-19 15:08:26 -0400
committerJames McCoy <jamessan@jamessan.com>2017-03-19 23:42:15 -0400
commitd3f15f1e6d299796bd552896c0ba01a7cca58618 (patch)
tree1784dbfc0865f5415f1a1aa94a2c29d97ae7258f /src
parente1af49b425f25024a3e6361ed576cf69296a1da4 (diff)
downloadrneovim-d3f15f1e6d299796bd552896c0ba01a7cca58618.tar.gz
rneovim-d3f15f1e6d299796bd552896c0ba01a7cca58618.tar.bz2
rneovim-d3f15f1e6d299796bd552896c0ba01a7cca58618.zip
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. https://github.com/vim/vim/commit/fffbf308dd98d1129ba4914d921ab47dc6a6c9b1
Diffstat (limited to 'src')
-rw-r--r--src/nvim/tag.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index 92a535ab91..1cbf789270 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -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) {