amdgpu: fix discards 'const' qualifier from pointer target type
PATCH 2/2 amdgpu: fix discards 'const' qualifier from pointer target type
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 <[email protected]>
--- amdgpu/amdgpu_asic_id.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
amdgpu/amdgpu_asic_id.c +1 -1
@@ -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 ;
Signature · 1 line
2.53.0