diff src/nbdebug.h @ 15874:c7ba5fed403c v8.1.0944

patch 8.1.0944: format of nbdbg() arguments is not checked commit https://github.com/vim/vim/commit/c85c8fcb9fad565da78e01248c12f662f6bc04c8 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 17 19:12:21 2019 +0100 patch 8.1.0944: format of nbdbg() arguments is not checked Problem: Format of nbdbg() arguments is not checked. Solution: Add format attribute. Fix reported problems. (Dominique Pelle, closes #3992)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Feb 2019 19:15:05 +0100
parents 4aead6a9b7a9
children 6e3dc2d630c2
line wrap: on
line diff
--- 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);