From: Florian Weimer <fweimer@redhat.com>
To: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Cc: bpf@vger.kernel.org, andrii@kernel.org, ast@kernel.org,
daniel@iogearbox.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next] tools/lib/bpf: fix -Wdiscarded-qualifiers under C23
Date: Fri, 28 Nov 2025 14:38:15 +0100 [thread overview]
Message-ID: <lhufr9y6zw8.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <1531b195c4cb7af96304341e7cbcaf7aba78e4b3.1764334686.git.mikhail.v.gavrilov@gmail.com> (Mikhail Gavrilov's message of "Fri, 28 Nov 2025 18:26:19 +0500")
* Mikhail Gavrilov:
> - Use explicit casts instead of changing variable types to const char *,
> because the variables are already declared as char * earlier in the
> functions and used in contexts requiring mutability.
> This is common practice in the kernel when full const-correctness
> cannot be preserved without major refactoring.
What kind of mutability is this about? Obviously char *const won't
work, but const char * seems to be fine for these variables?
Thanks,
Florian
next prev parent reply other threads:[~2025-11-28 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 0:22 [PATCH] tools/lib/bpf: fix -Wdiscarded-qualifiers under C23 Mikhail Gavrilov
2025-11-28 9:26 ` Florian Weimer
2025-11-28 13:26 ` [PATCH v2 bpf-next] " Mikhail Gavrilov
2025-11-28 13:38 ` Florian Weimer [this message]
2025-11-28 14:59 ` Mikhail Gavrilov
2025-12-05 23:51 ` Andrii Nakryiko
2025-12-06 8:05 ` [PATCH v3] " Mikhail Gavrilov
2025-12-06 9:28 ` Mikhail Gavrilov
2025-12-10 7:30 ` 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=lhufr9y6zw8.fsf@oldenburg.str.redhat.com \
--to=fweimer@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=mikhail.v.gavrilov@gmail.com \
--cc=netdev@vger.kernel.org \
/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