diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-04-08 12:38:26 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-04-08 12:38:26 +0200 |
commit | 4ac2e8d8e60dcc7dbff662e177b86ccfbda7cd9e (patch) | |
tree | 03d2b5045b471034c9e9f14faa99b2740fa0f6bd /src/vim.h | |
parent | 820082914122d5bf7b6e89ff30cf364ad40a560f (diff) | |
download | vim-git-4ac2e8d8e60dcc7dbff662e177b86ccfbda7cd9e.tar.gz |
patch 8.0.1676: no compiler warning for wrong printf formatv8.0.1676
Problem: No compiler warning for wrong printf format.
Solution: Add a printf attribute for gcc. Fix reported problems. (Dominique
Pelle, closes #2789)
Diffstat (limited to 'src/vim.h')
-rw-r--r-- | src/vim.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 */ |