Commit 7d85ef3
tools/lib/bpf: 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 *".
Declare `res` and `next_path` as const char * — they are never modified.
Keep `sym_sfx` as char * because it is advanced in a loop.
Suggested-by: Florian Weimer <[email protected]>
Suggested-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Mikhail Gavrilov <[email protected]>1 parent 6ba2fc1 commit 7d85ef3
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8484 | 8484 | | |
8485 | 8485 | | |
8486 | 8486 | | |
8487 | | - | |
| 8487 | + | |
8488 | 8488 | | |
8489 | 8489 | | |
8490 | 8490 | | |
| |||
11820 | 11820 | | |
11821 | 11821 | | |
11822 | 11822 | | |
11823 | | - | |
| 11823 | + | |
11824 | 11824 | | |
11825 | 11825 | | |
11826 | 11826 | | |
| |||
12401 | 12401 | | |
12402 | 12402 | | |
12403 | 12403 | | |
12404 | | - | |
| 12404 | + | |
12405 | 12405 | | |
12406 | 12406 | | |
12407 | 12407 | | |
| |||
0 commit comments