* fix discards const from pointer target
[not found] <alsa-project/alsa-utils/pr/322@alsa-project.org>
@ 2026-02-20 11:19 ` GitHub pull_request - opened
0 siblings, 0 replies; 2+ messages in thread
From: GitHub pull_request - opened @ 2026-02-20 11:19 UTC (permalink / raw)
To: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* fix discards const from pointer target
[not found] <alsa-project/alsa-lib/pr/496@alsa-project.org>
@ 2026-02-20 11:38 ` GitHub pull_request - opened
0 siblings, 0 replies; 2+ messages in thread
From: GitHub pull_request - opened @ 2026-02-20 11:38 UTC (permalink / raw)
To: alsa-devel
alsa-project/alsa-lib pull request #496 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
fixes:
```c
../../../src/seq/seqmid.c: In function 'snd_seq_parse_address':
../../../src/seq/seqmid.c:449:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
449 | if ((p = strpbrk(arg, ":.")) != NULL) {
| ^
../../../src/ucm/main.c: In function 'snd_use_case_get_list':
../../../src/ucm/main.c:2396:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2396 | str1 = strchr(identifier, '/');
| ^
../../../src/ucm/main.c: In function 'snd_use_case_geti':
../../../src/ucm/main.c:2721:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2721 | str1 = strchr(identifier, '/');
| ^
../../../src/ucm/main.c: In function 'snd_use_case_set':
../../../src/ucm/main.c:3038:22: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
3038 | str1 = strchr(identifier, '/');
| ^
../../../src/ucm/ucm_subs.c: In function 'strchr_with_escape':
../../../src/ucm/ucm_subs.c:832:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
832 | s = strchr(str, c);
| ^
../../src/conf.c: In function 'snd_config_hook_load_for_all_cards':
../../src/conf.c:4446:51: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
4446 | char *s = strchr(driver, '.');
| ^~~~~~
```
Request URL : https://github.com/alsa-project/alsa-lib/pull/496
Patch URL : https://github.com/alsa-project/alsa-lib/pull/496.patch
Repository URL: https://github.com/alsa-project/alsa-lib
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-20 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alsa-project/alsa-utils/pr/322@alsa-project.org>
2026-02-20 11:19 ` fix discards const from pointer target GitHub pull_request - opened
[not found] <alsa-project/alsa-lib/pr/496@alsa-project.org>
2026-02-20 11:38 ` GitHub pull_request - opened
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox