wall: 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:56:52 +02:00
parent 703ec6fc66
commit 59bb9ab136
1 changed files with 2 additions and 1 deletions

View File

@ -296,7 +296,8 @@ static void buf_puts(struct buffer *bs, const char *s)
bs->used += len;
}
static void buf_printf(struct buffer *bs, const char *fmt, ...)
static void __attribute__((__format__ (__printf__, 2, 3)))
buf_printf(struct buffer *bs, const char *fmt, ...)
{
int rc;
va_list ap;