]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
logger: add __format__ attribute
authorKarel Zak <kzak@redhat.com>
Fri, 18 Jun 2021 14:42:07 +0000 (16:42 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 18 Jun 2021 14:43:30 +0000 (16:43 +0200)
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/logger.c

index d51cd5988e06ef89377042f9d4442793992b8a50..27f745975b24154bbe593d8b4ddfe1dd15736fe1 100644 (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;