more: 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:58:38 +02:00
parent 0c753d8d6b
commit 2f38ae595b
1 changed files with 2 additions and 1 deletions

View File

@ -1209,7 +1209,8 @@ static void sigwinch_handler(struct more_control *ctl)
prepare_line_buffer(ctl);
}
static void execute(struct more_control *ctl, char *filename, char *cmd, ...)
static void __attribute__((__format__ (__printf__, 3, 4)))
execute(struct more_control *ctl, char *filename, const char *cmd, ...)
{
pid_t id;
va_list argp;