1
0
forked from aniani/vim

patch 8.0.1676: no compiler warning for wrong printf format

Problem:    No compiler warning for wrong printf format.
Solution:   Add a printf attribute for gcc. Fix reported problems. (Dominique
            Pelle, closes #2789)
This commit is contained in:
Bram Moolenaar
2018-04-08 12:38:26 +02:00
parent 8200829141
commit 4ac2e8d8e6
4 changed files with 24 additions and 6 deletions

View File

@@ -2549,4 +2549,11 @@ typedef enum {
#define TERM_START_FORCEIT 2
#define TERM_START_SYSTEM 4
/* Not generated automatically, to add extra attribute. */
void ch_log(channel_T *ch, const char *fmt, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
#endif /* VIM__H */