From: GitHub pull_request - opened <github@alsa-project.org>
To: alsa-devel@alsa-project.org
Subject: fix discards const from pointer target
Date: Fri, 20 Feb 2026 12:19:41 +0100 (CET) [thread overview]
Message-ID: <1895f0690d8bc200-webhooks-bot@alsa-project.org> (raw)
In-Reply-To: <alsa-project/alsa-utils/pr/322@alsa-project.org>
alsa-project/alsa-utils pull request #322 was opened from heitbaum:
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.
https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html
```c
../../alsactl/init_parse.c: In function 'elemid_get':
../../alsactl/init_parse.c:695:29: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
695 | char *pos = strchr(attr, ' ');
| ^~~~~~
../../alsactl/init_parse.c: In function 'conf_name_filter':
../../alsactl/init_parse.c:1284:21: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
1284 | char *ext = strrchr(d->d_name, '.');
| ^~~~~~~
../../aplay/aplay.c: In function 'create_path':
../../aplay/aplay.c:3226:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3226 | start = strchr(path + 1, '/');
| ^
../../aplay/aplay.c:3228:23: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3228 | start = strchr(path, '/');
| ^
../../topology/pre-process-object.c: In function 'tplg_pp_add_object_tuple_section':
../../topology/pre-process-object.c:562:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
562 | type = strchr(token_ref, '.');
| ^
../../topology/pre-process-dapm.c:175:14: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
175 | args = strchr(string, '.');
| ^
```
Request URL : https://github.com/alsa-project/alsa-utils/pull/322
Patch URL : https://github.com/alsa-project/alsa-utils/pull/322.patch
Repository URL: https://github.com/alsa-project/alsa-utils
next parent reply other threads:[~2026-02-20 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alsa-project/alsa-utils/pr/322@alsa-project.org>
2026-02-20 11:19 ` GitHub pull_request - opened [this message]
[not found] <alsa-project/alsa-lib/pr/496@alsa-project.org>
2026-02-20 11:38 ` fix discards const from pointer target GitHub pull_request - opened
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=1895f0690d8bc200-webhooks-bot@alsa-project.org \
--to=github@alsa-project.org \
--cc=alsa-devel@alsa-project.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox