From: Karel Zak Date: Fri, 18 Jun 2021 14:58:38 +0000 (+0200) Subject: more: add __format__ attribute X-Git-Tag: v2.38-rc1~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f38ae595b61f1d5531f47206aeb7289343b1b08;p=thirdparty%2Futil-linux.git more: add __format__ attribute Reported-by: Jan Pazdziora Signed-off-by: Karel Zak --- diff --git a/text-utils/more.c b/text-utils/more.c index 3cb2ca3af3..fe5b1d2459 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;