amd,compiler: fix const errors found with C23 glibc support
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

In glibc 2.43 the strstr function now propagate const to the output, triggering -Wincompatible-pointer-types-discards-qualifiers
under clang/gcc with -Werror.

Fix two of these cases by adding the const qualifier.

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39767>
This commit is contained in:
Reilly Brogan 2026-02-08 13:02:07 -06:00 committed by Marge Bot
parent 85fd63068e
commit ece5f671b3

View file

@ -390,8 +390,8 @@ static void
radv_add_split_disasm(const char *disasm, uint64_t start_addr, unsigned *num, struct radv_shader_inst *instructions)
{
struct radv_shader_inst *last_inst = *num ? &instructions[*num - 1] : NULL;
char *next;
char *repeat = strstr(disasm, "then repeated");
const char *next;
const char *repeat = strstr(disasm, "then repeated");
while ((next = strchr(disasm, '\n'))) {
struct radv_shader_inst *inst = &instructions[*num];