From 2f38ae595b61f1d5531f47206aeb7289343b1b08 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 18 Jun 2021 16:58:38 +0200 Subject: [PATCH] more: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak --- text-utils/more.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/text-utils/more.c b/text-utils/more.c index 3cb2ca3af..fe5b1d245 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -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;