From 66cd1f224c956f4853797c20468fe001b1d88418 Mon Sep 17 00:00:00 2001 From: Reilly Brogan Date: Sun, 8 Feb 2026 13:02:07 -0600 Subject: [PATCH] amd,compiler: fix const errors found with C23 glibc support 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 (cherry picked from commit ece5f671b3536d49b9c70d008f952e65c41198ff) Part-of: --- .pick_status.json | 2 +- src/amd/vulkan/radv_debug.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 6f445e5637a..ff028f8825c 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1324,7 +1324,7 @@ "description": "amd,compiler: fix const errors found with C23 glibc support", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index e9aecbeda22..1171b9bd546 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -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];