Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/tmux/dist tmux: fix -Wformat-nonliteral for Clang



details:   https://anonhg.NetBSD.org/src/rev/361d8f70a799
branches:  trunk
changeset: 378640:361d8f70a799
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Apr 19 21:52:17 2021 +0000

description:
tmux: fix -Wformat-nonliteral for Clang

dist/control.c:394:17: error: format string is not a string literal
    [-Werror,-Wformat-nonliteral]
        xvasprintf(&s, fmt, ap);
                       ^~~

dist/status.c:436:33: error: format string is not a string literal
    [-Werror,-Wformat-nonliteral]
        xvasprintf(&c->message_string, fmt, ap);
                                       ^~~

diffstat:

 external/bsd/tmux/dist/control.c |  2 +-
 external/bsd/tmux/dist/status.c  |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 3f45a371512b -r 361d8f70a799 external/bsd/tmux/dist/control.c
--- a/external/bsd/tmux/dist/control.c  Mon Apr 19 17:49:28 2021 +0000
+++ b/external/bsd/tmux/dist/control.c  Mon Apr 19 21:52:17 2021 +0000
@@ -385,7 +385,7 @@ control_pause_pane(struct client *c, str
 }
 
 /* Write a line. */
-static void
+static void __printflike(2, 0)
 control_vwrite(struct client *c, const char *fmt, va_list ap)
 {
        struct control_state    *cs = c->control_state;
diff -r 3f45a371512b -r 361d8f70a799 external/bsd/tmux/dist/status.c
--- a/external/bsd/tmux/dist/status.c   Mon Apr 19 17:49:28 2021 +0000
+++ b/external/bsd/tmux/dist/status.c   Mon Apr 19 21:52:17 2021 +0000
@@ -422,7 +422,7 @@ status_redraw(struct client *c)
 }
 
 /* Set a status line message. */
-void
+void __printflike(5, 0)
 status_message_set(struct client *c, int delay, int ignore_styles,
     int ignore_keys, const char *fmt, ...)
 {



Home | Main Index | Thread Index | Old Index