[BUILD] add format(printf) to printf-like functions
Doing this helps catching warnings about wrong output formats.
diff --git a/include/proto/log.h b/include/proto/log.h
index 4f6eed7..f2ecf0b 100644
--- a/include/proto/log.h
+++ b/include/proto/log.h
@@ -38,17 +38,20 @@
* Displays the message on stderr with the date and pid. Overrides the quiet
* mode during startup.
*/
-void Alert(const char *fmt, ...);
+void Alert(const char *fmt, ...)
+ __attribute__ ((format(printf, 1, 2)));
/*
* Displays the message on stderr with the date and pid.
*/
-void Warning(const char *fmt, ...);
+void Warning(const char *fmt, ...)
+ __attribute__ ((format(printf, 1, 2)));
/*
* Displays the message on <out> only if quiet mode is not set.
*/
-void qfprintf(FILE *out, const char *fmt, ...);
+void qfprintf(FILE *out, const char *fmt, ...)
+ __attribute__ ((format(printf, 2, 3)));
/*
* This function sends a syslog message to both log servers of a proxy,
@@ -56,7 +59,8 @@
* It also tries not to waste too much time computing the message header.
* It doesn't care about errors nor does it report them.
*/
-void send_log(struct proxy *p, int level, const char *message, ...);
+void send_log(struct proxy *p, int level, const char *message, ...)
+ __attribute__ ((format(printf, 3, 4)));
/*
* send a log for the session when we have enough info about it