public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Quentin Monnet <qmo@kernel.org>
To: Jiayuan Chen <mrpre@163.com>
Cc: bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
	ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net,
	kuba@kernel.org, hawk@kernel.org, john.fastabend@gmail.com,
	andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
	song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org,
	sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org
Subject: Re: [PATCH bpf-next v1 0/1] Using the right format specifiers for bpftool
Date: Fri, 7 Feb 2025 15:08:36 +0000	[thread overview]
Message-ID: <502d76e9-6933-41ca-9b74-23e339f6244c@kernel.org> (raw)
In-Reply-To: <7gpn4zamubd3j6d3wiywpfftbu7vxawrlwzjwse3lbv3ovejlu@2vfemcisx5pi>

2025-02-07 22:27 UTC+0800 ~ Jiayuan Chen <mrpre@163.com>
> On Fri, Feb 07, 2025 at 01:22:19PM +0000, Quentin Monnet wrote:
>> 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
> Yes, I previously added '-Wformat -Wformat-signedness', but I just tried
> again and it turns out that only '-Wformat-signedness' takes effect.


I rememeber now that -Wformat is already included in bpftool's Makefile
via tools/scripts/Makefile.include (variable $(EXTRA_WARNINGS)), so it
wouldn't make a difference anyway whether you add it again in bpftool's
Makefile or not.

  reply	other threads:[~2025-02-07 15:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2025-02-11  0:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=502d76e9-6933-41ca-9b74-23e339f6244c@kernel.org \
    --to=qmo@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mrpre@163.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox