Mercurial > vim
comparison src/evalfunc.c @ 15490:98c35d312987 v8.1.0753
patch 8.1.0753: printf format not checked for semsg()
commit https://github.com/vim/vim/commit/b5443cc46dd1485d6c785dd8c65a2c07bd5a17f3
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 15 20:19:40 2019 +0100
patch 8.1.0753: printf format not checked for semsg()
Problem: printf format not checked for semsg().
Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle,
closes #3805)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 15 Jan 2019 20:30:07 +0100 |
parents | 55ccc2d353bd |
children | 74a8f44b5322 |
comparison
equal
deleted
inserted
replaced
15489:3bbefd5c9d0d | 15490:98c35d312987 |
---|---|
8254 } | 8254 } |
8255 if (error == TRUE) | 8255 if (error == TRUE) |
8256 return; | 8256 return; |
8257 if (id >= 1 && id <= 3) | 8257 if (id >= 1 && id <= 3) |
8258 { | 8258 { |
8259 semsg(_("E798: ID is reserved for \":match\": %ld"), id); | 8259 semsg(_("E798: ID is reserved for \":match\": %d"), id); |
8260 return; | 8260 return; |
8261 } | 8261 } |
8262 | 8262 |
8263 rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, | 8263 rettv->vval.v_number = match_add(win, grp, pat, prio, id, NULL, |
8264 conceal_char); | 8264 conceal_char); |
8312 return; | 8312 return; |
8313 | 8313 |
8314 /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */ | 8314 /* id == 3 is ok because matchaddpos() is supposed to substitute :3match */ |
8315 if (id == 1 || id == 2) | 8315 if (id == 1 || id == 2) |
8316 { | 8316 { |
8317 semsg(_("E798: ID is reserved for \":match\": %ld"), id); | 8317 semsg(_("E798: ID is reserved for \":match\": %d"), id); |
8318 return; | 8318 return; |
8319 } | 8319 } |
8320 | 8320 |
8321 rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, | 8321 rettv->vval.v_number = match_add(win, group, NULL, prio, id, l, |
8322 conceal_char); | 8322 conceal_char); |