Mercurial > vim
comparison src/tag.c @ 9068:0a3bc9fdea20 v7.4.1819
commit https://github.com/vim/vim/commit/827b165b2aebad2cfe98cc6d5804c6c0fe8afd89
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 5 18:14:03 2016 +0200
patch 7.4.1819
Problem: Compiler warnings when sprintf() is a macro.
Solution: Don't interrupt sprintf() with an #ifdef. (Michael Jarvis,
closes https://github.com/vim/vim/issues/788)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 05 May 2016 18:15:05 +0200 |
parents | a2aca019ba48 |
children | f094d4085014 |
comparison
equal
deleted
inserted
replaced
9067:5b17dee417e5 | 9068:0a3bc9fdea20 |
---|---|
2262 * tags we are dealing with. | 2262 * tags we are dealing with. |
2263 */ | 2263 */ |
2264 if (ga_grow(&ga_match[mtt], 1) == OK) | 2264 if (ga_grow(&ga_match[mtt], 1) == OK) |
2265 { | 2265 { |
2266 int len; | 2266 int len; |
2267 int heuristic; | |
2267 | 2268 |
2268 if (help_only) | 2269 if (help_only) |
2269 { | 2270 { |
2270 #ifdef FEAT_MULTI_LANG | 2271 #ifdef FEAT_MULTI_LANG |
2271 # define ML_EXTRA 3 | 2272 # define ML_EXTRA 3 |
2291 STRCPY(p, tagp.tagname); | 2292 STRCPY(p, tagp.tagname); |
2292 #ifdef FEAT_MULTI_LANG | 2293 #ifdef FEAT_MULTI_LANG |
2293 p[len] = '@'; | 2294 p[len] = '@'; |
2294 STRCPY(p + len + 1, help_lang); | 2295 STRCPY(p + len + 1, help_lang); |
2295 #endif | 2296 #endif |
2297 | |
2298 heuristic = help_heuristic(tagp.tagname, | |
2299 match_re ? matchoff : 0, !match_no_ic); | |
2300 #ifdef FEAT_MULTI_LANG | |
2301 heuristic += help_pri; | |
2302 #endif | |
2296 sprintf((char *)p + len + 1 + ML_EXTRA, "%06d", | 2303 sprintf((char *)p + len + 1 + ML_EXTRA, "%06d", |
2297 help_heuristic(tagp.tagname, | 2304 heuristic); |
2298 match_re ? matchoff : 0, !match_no_ic) | |
2299 #ifdef FEAT_MULTI_LANG | |
2300 + help_pri | |
2301 #endif | |
2302 ); | |
2303 } | 2305 } |
2304 *tagp.tagname_end = TAB; | 2306 *tagp.tagname_end = TAB; |
2305 } | 2307 } |
2306 else if (name_only) | 2308 else if (name_only) |
2307 { | 2309 { |