0
0
mirror of https://github.com/vim/vim.git synced 2025-10-23 08:44:20 -04:00

patch 8.1.0954: arguments of semsg() and siemsg() are not checked

Problem:    Arguments of semsg() and siemsg() are not checked.
Solution:   Add function prototype with __attribute__.
This commit is contained in:
Bram Moolenaar
2019-02-19 21:34:05 +01:00
parent c9629251a6
commit 0d8562a999
4 changed files with 30 additions and 4 deletions

View File

@@ -134,6 +134,28 @@ smsg_attr_keep(int, const char *, ...)
#endif
;
/* These prototypes cannot be produced automatically. */
int
# ifdef __BORLANDC__
_RTLENTRYF
# endif
semsg(const char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 1, 0)))
#endif
;
/* These prototypes cannot be produced automatically. */
void
# ifdef __BORLANDC__
_RTLENTRYF
# endif
siemsg(const char *, ...)
#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 1, 0)))
#endif
;
int
# ifdef __BORLANDC__
_RTLENTRYF