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

index e3039496336f0650e54b3ddcbae4c329f5627eb7..ca5fbc38026246b288a1636897782643803ccc65 100644 (file)
@@ -110,7 +110,8 @@ static void vinfo(const char *fmt, va_list va)
        fputc('\n', stdout);
 }
 
-static inline void verbose(const struct eject_control *ctl, const char *fmt, ...)
+static inline void __attribute__ ((__format__ (__printf__, 2, 3)))
+       verbose(const struct eject_control *ctl, const char *fmt, ...)
 {
        va_list va;
 
@@ -122,7 +123,8 @@ static inline void verbose(const struct eject_control *ctl, const char *fmt, ...
        va_end(va);
 }
 
-static inline void info(const char *fmt, ...)
+static inline __attribute__ ((__format__ (__printf__, 1, 2)))
+       void info(const char *fmt, ...)
 {
        va_list va;
        va_start(va, fmt);