From e71d44a4592ba6c4317de5a57a729d6a97955e0b 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 d51cd5988e..27f745975b 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; -- 2.47.3