]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
more: add __format__ attribute
authorKarel Zak <kzak@redhat.com>
Fri, 18 Jun 2021 14:58:38 +0000 (16:58 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 20 Jul 2021 09:30:00 +0000 (11:30 +0200)
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/more.c

index 3cb2ca3af38803d0a2948b5ea2aa44070d7c94fc..fe5b1d2459f77cc1ac47a01da8aa344e2773c27d 100644 (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;