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

index b891ad4808a31f8f4b00541b413dc87820a89a82..e7842c1064ae770d94c581ea653dabf85b342983 100644 (file)
@@ -217,7 +217,7 @@ prog_inv_sh_nm_from_file(char *f, char stripext)
 
 
 #ifndef HAVE_ERR_H
-static inline void
+static inline void __attribute__ ((__format__ (__printf__, 4, 5)))
 errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
 {
        fprintf(stderr, "%s: ", program_invocation_short_name);