Skip to content

tools/lib/bpf: fix -Wdiscarded-qualifiers under C23#6438

Closed
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit intobpf-next_basefrom
series/1028705=>bpf-next
Closed

tools/lib/bpf: fix -Wdiscarded-qualifiers under C23#6438
kernel-patches-daemon-bpf-rc[bot] wants to merge 1 commit intobpf-next_basefrom
series/1028705=>bpf-next

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

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

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 688b745
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 19f4091
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: bd5bdd2
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 34235a3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c1af446
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: ff34657
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: ff34657
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 8f7aa3d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 835a507
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 835a507
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 835a507
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 81f88f6
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

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 <fweimer@redhat.com>
Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 5d9fb42
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705
version: 2

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=1028705 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments