From: Karel Zak Date: Fri, 18 Jun 2021 14:49:28 +0000 (+0200) Subject: eject: add __format__ attribute X-Git-Tag: v2.38-rc1~429 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ddadf4748deb677fd06baeb987d358853ec303e9;p=thirdparty%2Futil-linux.git eject: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak --- diff --git a/sys-utils/eject.c b/sys-utils/eject.c index e303949633..ca5fbc3802 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -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);