Re: [PATCH bpf-next v1 0/1] Using the right format specifiers for bpftool

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

 



On 07/02/2025 12:37, Jiayuan Chen wrote:
> 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.

No objection from the maintainer, thanks for looking into this. Did you
catch these issues with just "-Wformat"? I'm asking because I need to
use an additional flag, "-Wformat-signedness", to have my compiler
display the %d/%u reports.

Thanks,
Quentin




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux