Commit d70f79f
libbpf: Fix -Wdiscarded-qualifiers under C23
glibc ≥ 2.42 (GCC 15) defaults to -std=gnu23, which promotes
-Wdiscarded-qualifiers to an error.
In C23, strstr() and strchr() return "const char *".
Change variable types to const char * where the pointers are never
modified (res, sym_sfx, next_path).
Suggested-by: Florian Weimer <fweimer@redhat.com>
Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Link: https://lore.kernel.org/r/20251206092825.1471385-1-mikhail.v.gavrilov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 639f58a commit d70f79f
1 file changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8484 | 8484 | | |
8485 | 8485 | | |
8486 | 8486 | | |
8487 | | - | |
| 8487 | + | |
8488 | 8488 | | |
8489 | 8489 | | |
8490 | 8490 | | |
| |||
11818 | 11818 | | |
11819 | 11819 | | |
11820 | 11820 | | |
11821 | | - | |
| 11821 | + | |
| 11822 | + | |
11822 | 11823 | | |
11823 | 11824 | | |
11824 | 11825 | | |
| |||
12401 | 12402 | | |
12402 | 12403 | | |
12403 | 12404 | | |
12404 | | - | |
| 12405 | + | |
12405 | 12406 | | |
12406 | 12407 | | |
12407 | 12408 | | |
| |||
0 commit comments