logger: add __format__ attribute

Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-06-18 16:42:07 +02:00
parent 609468bc9b
commit 7bee16f27f
1 changed files with 2 additions and 1 deletions

View File

@ -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;