Mercurial > vim
diff src/proto/message.pro @ 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 | dd725a8ab112 |
line wrap: on
line diff
--- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -11,9 +11,18 @@ int emsg_not_now(void); void ignore_error_for_testing(char_u *error); void do_perror(char *msg); int emsg(char *s); -int semsg(const char *s, ...); + +int semsg(const char *s, ...) +#ifdef USE_PRINTF_FORMAT_ATTRIBUTE + __attribute__((format(printf, 1, 2))) +#endif +; void iemsg(char *s); -void siemsg(const char *s, ...); +void siemsg(const char *s, ...) +#ifdef USE_PRINTF_FORMAT_ATTRIBUTE + __attribute__((format(printf, 1, 2))) +#endif +; void internal_error(char *where); void emsg_invreg(int name); char_u *msg_trunc_attr(char_u *s, int force, int attr);