From 6d7677f937028bcbbb60a8eac753bfb1d40556df 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 11afd70f198..e8e6237a312 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1234,7 +1234,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 842bca2a7c3..40a1aaf7ceb 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -388,8 +388,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];