public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2-next] ss: fix the compiler warning
@ 2024-03-07 10:53 Denis Kirjanov
  2024-03-09 18:22 ` David Ahern
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kirjanov @ 2024-03-07 10:53 UTC (permalink / raw)
  To: stephen, dsahern; +Cc: netdev, Denis Kirjanov

the patch fixes the following compiler warning:

ss.c:1064:53: warning: format string is not a string literal [-Wformat-nonliteral]
        len = vsnprintf(pos, buf_chunk_avail(buffer.tail), fmt, _args);
                                                           ^~~
1 warning generated.
    LINK     ss

Fixes: e3ecf0485 ("ss: pretty-print BPF socket-local storage")
Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>
---
 misc/ss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/misc/ss.c b/misc/ss.c
index 87008d7c..038905f3 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1042,6 +1042,7 @@ static int buf_update(int len)
 }
 
 /* Append content to buffer as part of the current field */
+__attribute__((format(printf, 1, 0)))
 static void vout(const char *fmt, va_list args)
 {
 	struct column *f = current_field;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-11 14:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07 10:53 [PATCH iproute2-next] ss: fix the compiler warning Denis Kirjanov
2024-03-09 18:22 ` David Ahern
2024-03-09 19:30   ` Stephen Hemminger
2024-03-11 14:20   ` Denis Kirjanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox