summaryrefslogtreecommitdiff
path: root/src/nbdebug.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-17 19:12:21 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-17 19:12:21 +0100
commitc85c8fcb9fad565da78e01248c12f662f6bc04c8 (patch)
tree243267d5088c9b49e8b907d68034f22dbad2b03d /src/nbdebug.h
parent749f07c0db58d4f2fed2017f5a55bb053c9475ab (diff)
downloadvim-git-c85c8fcb9fad565da78e01248c12f662f6bc04c8.tar.gz
patch 8.1.0944: format of nbdbg() arguments is not checkedv8.1.0944
Problem: Format of nbdbg() arguments is not checked. Solution: Add format attribute. Fix reported problems. (Dominique Pelle, closes #3992)
Diffstat (limited to 'src/nbdebug.h')
-rw-r--r--src/nbdebug.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nbdebug.h b/src/nbdebug.h
index 6331f49c3..16dd84798 100644
--- a/src/nbdebug.h
+++ b/src/nbdebug.h
@@ -42,7 +42,11 @@ typedef enum {
} WtWait;
-void nbdbg(char *, ...);
+void nbdbg(char *, ...)
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 1, 2)))
+#endif
+;
void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
void nbdebug_log_init(char *log_var, char *level_var);