-
Notifications
You must be signed in to change notification settings - Fork 5
tools/lib/bpf: fix -Wdiscarded-qualifiers under C23 #6438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bpf-next_base
Are you sure you want to change the base?
tools/lib/bpf: fix -Wdiscarded-qualifiers under C23 #6438
Conversation
|
Upstream branch: 688b745 |
8c83cb5 to
f015201
Compare
|
Upstream branch: 19f4091 |
f0d77ea to
313e3be
Compare
f015201 to
884c5bc
Compare
|
Upstream branch: bd5bdd2 |
313e3be to
e0ce0b7
Compare
884c5bc to
4355736
Compare
|
Upstream branch: 34235a3 |
e0ce0b7 to
dee81b0
Compare
4355736 to
5bece43
Compare
|
Upstream branch: c1af446 |
dee81b0 to
d3dcd88
Compare
5bece43 to
52f5a27
Compare
|
Upstream branch: ff34657 |
glibc ≥ 2.42 (GCC 15) defaults to -std=gnu23, which promotes -Wdiscarded-qualifiers to an error in the default hardening flags of Fedora Rawhide, Arch Linux, openSUSE Tumbleweed, Gentoo, etc. In C23, strstr() and strchr() return "const char *" in most cases, making previous implicit casts invalid. This breaks the build of tools/bpf/resolve_btfids on pristine upstream kernel when using GCC 15 + glibc 2.42+. Fix the three remaining instances with explicit casts. No functional changes. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2417601 Suggested-by: Florian Weimer <[email protected]> Signed-off-by: Mikhail Gavrilov <[email protected]>
d3dcd88 to
4d08fd0
Compare
Pull request for series with
subject: tools/lib/bpf: fix -Wdiscarded-qualifiers under C23
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705