report() is a wrapper for printf(), but the compiler was not aware. Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> --- lib/libcflat.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/libcflat.h b/lib/libcflat.h index b1ea5e607033..a5c42903b11f 100644 --- a/lib/libcflat.h +++ b/lib/libcflat.h @@ -96,14 +96,20 @@ extern int vsnprintf(char *buf, int size, const char *fmt, va_list va) extern int vprintf(const char *fmt, va_list va) __attribute__((format(printf, 1, 0))); -void report_prefix_pushf(const char *prefix_fmt, ...); +void report_prefix_pushf(const char *prefix_fmt, ...) + __attribute__((format(printf, 1, 2))); extern void report_prefix_push(const char *prefix); extern void report_prefix_pop(void); -extern void report(const char *msg_fmt, bool pass, ...); -extern void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...); -extern void report_abort(const char *msg_fmt, ...); -extern void report_skip(const char *msg_fmt, ...); -extern void report_info(const char *msg_fmt, ...); +extern void report(const char *msg_fmt, bool pass, ...) + __attribute__((format(printf, 1, 3))); +extern void report_xfail(const char *msg_fmt, bool xfail, bool pass, ...) + __attribute__((format(printf, 1, 4))); +extern void report_abort(const char *msg_fmt, ...) + __attribute__((format(printf, 1, 2))); +extern void report_skip(const char *msg_fmt, ...) + __attribute__((format(printf, 1, 2))); +extern void report_info(const char *msg_fmt, ...) + __attribute__((format(printf, 1, 2))); extern void report_pass(void); extern int report_summary(void); -- 2.13.0