From 7bee16f27f064f9062083cd30d64b83ca9dcfb40 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 18 Jun 2021 16:42:07 +0200 Subject: [PATCH] logger: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak --- misc-utils/logger.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc-utils/logger.c b/misc-utils/logger.c index d51cd5988..27f745975 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -619,7 +619,8 @@ static void add_structured_data_param(struct list_head *ls, const char *param) err_oom(); } -static void add_structured_data_paramf(struct list_head *ls, const char *fmt, ...) +static void __attribute__ ((__format__ (__printf__, 2, 3))) + add_structured_data_paramf(struct list_head *ls, const char *fmt, ...) { struct structured_data *sd; va_list ap;