public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/1] Using the right format specifiers for bpftool
@ 2025-02-07 12:37 Jiayuan Chen
  2025-02-07 12:37 ` [PATCH bpf-next v1 1/1] bpftool: Using the right format specifiers Jiayuan Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jiayuan Chen @ 2025-02-07 12:37 UTC (permalink / raw)
  To: bpf
  Cc: linux-kernel, ast, daniel, davem, kuba, hawk, john.fastabend,
	andrii, martin.lau, eddyz87, song, yonghong.song, kpsingh, sdf,
	haoluo, jolsa, qmo, Jiayuan Chen

Fixed some incorrect formatting specifiers that were exposed when I added
the "-Wformat" flag to the compiler options.

This patch doesn't include "-Wformat" in the Makefile for now, as I've
only addressed some obvious semantic issues with the compiler warnings.
There are still other warnings that need to be tackled.

For example, there's an ifindex that's sometimes defined as a signed type
and sometimes as an unsigned type, which makes formatting a real pain
- sometimes it needs %d and sometimes %u. This might require a more
fundamental fix from the variable definition side.

If the maintainer is okay with adding "-Wformat" to the
tools/bpf/bpftool/Makefile, please let us know, and we can follow up with
further fixes.

Jiayuan Chen (1):
  bpftool: Using the right format specifiers

 tools/bpf/bpftool/gen.c  | 12 ++++++------
 tools/bpf/bpftool/link.c | 14 +++++++-------
 tools/bpf/bpftool/main.c |  8 ++++----
 tools/bpf/bpftool/map.c  | 10 +++++-----
 4 files changed, 22 insertions(+), 22 deletions(-)

-- 
2.43.5


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

end of thread, other threads:[~2025-02-11  0:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 12:37 [PATCH bpf-next v1 0/1] Using the right format specifiers for bpftool Jiayuan Chen
2025-02-07 12:37 ` [PATCH bpf-next v1 1/1] bpftool: Using the right format specifiers Jiayuan Chen
2025-02-07 13:22   ` Quentin Monnet
2025-02-07 13:22 ` [PATCH bpf-next v1 0/1] Using the right format specifiers for bpftool Quentin Monnet
2025-02-07 14:27   ` Jiayuan Chen
2025-02-07 15:08     ` Quentin Monnet
2025-02-11  0:10 ` patchwork-bot+netdevbpf

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