All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute] ss: fix format string warnings
@ 2024-06-27 17:00 Stephen Hemminger
  2024-06-27 17:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2024-06-27 17:00 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger

Clang complains that format string is not a string literal
unless the functions are annotated.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 misc/ss.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/misc/ss.c b/misc/ss.c
index 8ff6e100..eb68e506 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1043,6 +1043,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;
@@ -3460,6 +3461,7 @@ static int bpf_maps_opts_load_btf(struct bpf_map_info *info, struct btf **btf)
 	return 0;
 }
 
+__attribute__((format(printf, 2, 0)))
 static void out_bpf_sk_storage_print_fn(void *ctx, const char *fmt, va_list args)
 {
 	vout(fmt, args);
-- 
2.43.0


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

* Re: [PATCH iproute] ss: fix format string warnings
  2024-06-27 17:00 [PATCH iproute] ss: fix format string warnings Stephen Hemminger
@ 2024-06-27 17:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-06-27 17:10 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Thu, 27 Jun 2024 10:00:18 -0700 you wrote:
> Clang complains that format string is not a string literal
> unless the functions are annotated.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  misc/ss.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [iproute] ss: fix format string warnings
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=357808abd3a6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-06-27 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27 17:00 [PATCH iproute] ss: fix format string warnings Stephen Hemminger
2024-06-27 17:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.