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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user