summaryrefslogtreecommitdiff
path: root/src/vim.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-08 12:38:26 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-08 12:38:26 +0200
commit4ac2e8d8e60dcc7dbff662e177b86ccfbda7cd9e (patch)
tree03d2b5045b471034c9e9f14faa99b2740fa0f6bd /src/vim.h
parent820082914122d5bf7b6e89ff30cf364ad40a560f (diff)
downloadvim-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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vim.h b/src/vim.h
index 626c0ad12..78dede0cd 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -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 */