mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
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 ece5f671b3)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39828>
This commit is contained in:
parent
a871c42e39
commit
66cd1f224c
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue