summaryrefslogtreecommitdiff
path: root/src/tag.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-05-05 18:14:03 +0200
committerBram Moolenaar <Bram@vim.org>2016-05-05 18:14:03 +0200
commit827b165b2aebad2cfe98cc6d5804c6c0fe8afd89 (patch)
treeeb91cbe5b6be5b9830d69cafcc4f7bdb626bb170 /src/tag.c
parent89c79b99328b66f77f1d12dc8c6701dfe2c57f15 (diff)
downloadvim-git-827b165b2aebad2cfe98cc6d5804c6c0fe8afd89.tar.gz
patch 7.4.1819v7.4.1819
Problem: Compiler warnings when sprintf() is a macro. Solution: Don't interrupt sprintf() with an #ifdef. (Michael Jarvis, closes #788)
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tag.c b/src/tag.c
index 8f4495ee2..0029fa5fd 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -2264,6 +2264,7 @@ parse_line:
if (ga_grow(&ga_match[mtt], 1) == OK)
{
int len;
+ int heuristic;
if (help_only)
{
@@ -2293,13 +2294,14 @@ parse_line:
p[len] = '@';
STRCPY(p + len + 1, help_lang);
#endif
- sprintf((char *)p + len + 1 + ML_EXTRA, "%06d",
- help_heuristic(tagp.tagname,
- match_re ? matchoff : 0, !match_no_ic)
+
+ heuristic = help_heuristic(tagp.tagname,
+ match_re ? matchoff : 0, !match_no_ic);
#ifdef FEAT_MULTI_LANG
- + help_pri
+ heuristic += help_pri;
#endif
- );
+ sprintf((char *)p + len + 1 + ML_EXTRA, "%06d",
+ heuristic);
}
*tagp.tagname_end = TAB;
}