comparison src/proto.h @ 19760:9daed26b788b v8.2.0436

patch 8.2.0436: no warnings for incorrect printf arguments Commit: https://github.com/vim/vim/commit/db99f9f29a248b84742b6779c3343123f72065e7 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 23 22:12:22 2020 +0100 patch 8.2.0436: no warnings for incorrect printf arguments Problem: No warnings for incorrect printf arguments. Solution: Fix attribute in declaration. Fix uncovered mistakes. (Dominique Pelle, closes #5834)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Mar 2020 22:15:05 +0100
parents 22f0dda71638
children 00a1b89256ea
comparison
equal deleted inserted replaced
19759:321ee36ae10c 19760:9daed26b788b
117 # endif 117 # endif
118 118
119 // These prototypes cannot be produced automatically. 119 // These prototypes cannot be produced automatically.
120 int smsg(const char *, ...) 120 int smsg(const char *, ...)
121 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE 121 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
122 __attribute__((format(printf, 1, 0))) 122 __attribute__((format(printf, 1, 2)))
123 # endif 123 # endif
124 ; 124 ;
125 125
126 int smsg_attr(int, const char *, ...) 126 int smsg_attr(int, const char *, ...)
127 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE 127 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
136 ; 136 ;
137 137
138 // These prototypes cannot be produced automatically. 138 // These prototypes cannot be produced automatically.
139 int semsg(const char *, ...) 139 int semsg(const char *, ...)
140 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE 140 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
141 __attribute__((format(printf, 1, 0))) 141 __attribute__((format(printf, 1, 2)))
142 # endif 142 # endif
143 ; 143 ;
144 144
145 // These prototypes cannot be produced automatically. 145 // These prototypes cannot be produced automatically.
146 void siemsg(const char *, ...) 146 void siemsg(const char *, ...)
147 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE 147 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE
148 __attribute__((format(printf, 1, 0))) 148 __attribute__((format(printf, 1, 2)))
149 # endif 149 # endif
150 ; 150 ;
151 151
152 int vim_snprintf_add(char *, size_t, const char *, ...) 152 int vim_snprintf_add(char *, size_t, const char *, ...)
153 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE 153 # ifdef USE_PRINTF_FORMAT_ATTRIBUTE