diff --git a/include/proto/buffers.h b/include/proto/buffers.h index 95d63a53a..1364b45c7 100644 --- a/include/proto/buffers.h +++ b/include/proto/buffers.h @@ -111,7 +111,8 @@ int buffer_write_chunk(struct buffer *buf, struct chunk *chunk); int buffer_replace(struct buffer *b, char *pos, char *end, const char *str); int buffer_replace2(struct buffer *b, char *pos, char *end, const char *str, int len); int buffer_insert_line2(struct buffer *b, char *pos, const char *str, int len); -int chunk_printf(struct chunk *chk, int size, const char *fmt, ...); +int chunk_printf(struct chunk *chk, int size, const char *fmt, ...) + __attribute__ ((format(printf, 3, 4))); void buffer_dump(FILE *o, struct buffer *b, int from, int to); /* diff --git a/include/proto/log.h b/include/proto/log.h index 1a02ec122..679f85005 100644 --- a/include/proto/log.h +++ b/include/proto/log.h @@ -38,17 +38,20 @@ extern struct pool_head *pool2_requri; * Displays the message on stderr with the date and pid. Overrides the quiet * mode during startup. */ -void Alert(char *fmt, ...); +void Alert(const char *fmt, ...) + __attribute__ ((format(printf, 1, 2))); /* * Displays the message on stderr with the date and pid. */ -void Warning(char *fmt, ...); +void Warning(const char *fmt, ...) + __attribute__ ((format(printf, 1, 2))); /* * Displays the message on only if quiet mode is not set. */ -void qfprintf(FILE *out, 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 @@ void qfprintf(FILE *out, char *fmt, ...); * 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, 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