From: Karel Zak Date: Fri, 18 Jun 2021 14:42:07 +0000 (+0200) Subject: logger: add __format__ attribute X-Git-Tag: v2.38-rc1~430 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e71d44a4592ba6c4317de5a57a729d6a97955e0b;p=thirdparty%2Futil-linux.git logger: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak --- 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;