diff options
author | Jiayuan Chen <jiayuan.chen@linux.dev> | 2025-03-11 14:28:08 +0300 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2025-03-17 23:50:56 +0300 |
commit | 8d86767be9c9b94f196e663e0ca88e2eb604a20e (patch) | |
tree | 7a1e483a41b5ad31d25a616185dd2dd8e274e6f9 /rust/helpers/helpers.c | |
parent | b02f072a36560a89155a1ebcb2ca6bd881333a8b (diff) | |
download | linux-8d86767be9c9b94f196e663e0ca88e2eb604a20e.tar.xz |
bpftool: Add -Wformat-signedness flag to detect format errors
This commit adds the -Wformat-signedness compiler flag to detect and
prevent printf format errors, where signed or unsigned types are
mismatched with format specifiers. This helps to catch potential issues at
compile-time, ensuring that our code is more robust and reliable. With
this flag, the compiler will now warn about incorrect format strings, such
as using %d with unsigned types or %u with signed types.
Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20250311112809.81901-2-jiayuan.chen@linux.dev
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions