* [PATCH libdrm 2/2] amdgpu: fix discards 'const' qualifier from pointer target type
@ 2026-04-02 7:57 Rudi Heitbaum
0 siblings, 0 replies; only message in thread
From: Rudi Heitbaum @ 2026-04-02 7:57 UTC (permalink / raw)
To: dri-devel; +Cc: rudi
Since glibc-2.43:
For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers
into their input arrays now have definitions as macros that return a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type.
fixes:
amdgpu/amdgpu_asic_id.c: In function 'find_asic_id_table':
amdgpu/amdgpu_asic_id.c:249:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
249 | file_name = strrchr(AMDGPU_ASIC_ID_TABLE, '/');
| ^
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
amdgpu/amdgpu_asic_id.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/amdgpu/amdgpu_asic_id.c b/amdgpu/amdgpu_asic_id.c
index cd8ee596..fed3a531 100644
--- a/amdgpu/amdgpu_asic_id.c
+++ b/amdgpu/amdgpu_asic_id.c
@@ -238,7 +238,7 @@ static char *find_asic_id_table(void)
{
// first check the paths in AMDGPU_ASIC_ID_TABLE_PATHS environment variable
const char *amdgpu_asic_id_table_paths = secure_getenv("AMDGPU_ASIC_ID_TABLE_PATHS");
- char *file_name = NULL;
+ const char *file_name = NULL;
char *found_path = NULL;
char **paths = NULL;
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-02 7:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 7:57 [PATCH libdrm 2/2] amdgpu: fix discards 'const' qualifier from pointer target type Rudi Heitbaum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.