All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rudi Heitbaum <rudi@heitbaum.com>
To: dri-devel@lists.freedesktop.org
Cc: rudi@heitbaum.com
Subject: [PATCH libdrm 2/2] amdgpu: fix discards 'const' qualifier from pointer target type
Date: Thu, 2 Apr 2026 07:57:03 +0000	[thread overview]
Message-ID: <ac4hTyaeUHRTfTi2@b22fc13bbf9b> (raw)

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


                 reply	other threads:[~2026-04-02  7:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ac4hTyaeUHRTfTi2@b22fc13bbf9b \
    --to=rudi@heitbaum.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.