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)
diff --git a/src/proto.h b/src/proto.h
index a8faa83..74f38cd 100644
--- a/src/proto.h
+++ b/src/proto.h
@@ -119,7 +119,7 @@
// These prototypes cannot be produced automatically.
int smsg(const char *, ...)
# ifdef USE_PRINTF_FORMAT_ATTRIBUTE
- __attribute__((format(printf, 1, 0)))
+ __attribute__((format(printf, 1, 2)))
# endif
;
@@ -138,14 +138,14 @@
// These prototypes cannot be produced automatically.
int semsg(const char *, ...)
# ifdef USE_PRINTF_FORMAT_ATTRIBUTE
- __attribute__((format(printf, 1, 0)))
+ __attribute__((format(printf, 1, 2)))
# endif
;
// These prototypes cannot be produced automatically.
void siemsg(const char *, ...)
# ifdef USE_PRINTF_FORMAT_ATTRIBUTE
- __attribute__((format(printf, 1, 0)))
+ __attribute__((format(printf, 1, 2)))
# endif
;