From c13d68d2dca26afff8a4f8c91f015ee87c5f3e65 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 8 Feb 2026 21:28:14 -0800 Subject: [PATCH] freedreno/decode: Fix const correctness in get_tex_count Fix compiler error: ../src/freedreno/decode/cffdec.c:580:7: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 580 | p = strstr(name, "CONST"); | ^ ~~~~~~~~~~~~~~~~~~~~~ glibc now provides C23-style type-generic string functions. strstr returns const char * when passed a const char * argument. Update p declaration to const since it's only used for offset calculation. Fixes: 1ea4ef0d3be ("freedreno: slurp in decode tools") Signed-off-by: Vinson Lee (cherry picked from commit bc34a122f3a1de1db14cbef2059c1228de58a89e) Part-of: --- .pick_status.json | 2 +- src/freedreno/decode/cffdec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index eda3ee27038..f2734e66228 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1064,7 +1064,7 @@ "description": "freedreno/decode: Fix const correctness in get_tex_count", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1ea4ef0d3be829e392922f5d26fbc89bf69a8a67", "notes": null diff --git a/src/freedreno/decode/cffdec.c b/src/freedreno/decode/cffdec.c index d37491cc668..ca0594af54d 100644 --- a/src/freedreno/decode/cffdec.c +++ b/src/freedreno/decode/cffdec.c @@ -536,7 +536,7 @@ static int get_tex_count(const char *name) { char count_reg[strlen(name) + 5]; - char *p; + const char *p; p = strstr(name, "CONST"); if (!p)