eject: 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:49:28 +02:00
parent 7bee16f27f
commit 856ec50de5
1 changed files with 4 additions and 2 deletions

View 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);