Since glibc-2.43 the following warnings occur due to:
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 in put argument is a pointer
to a const-qualified type.
https://lists.gnu.org/archive/html/info-gnu/2026-01/msg00005.html
../../ncurses/tinfo/comp_parse.c: In function 'check_collisions':
../../ncurses/tinfo/comp_parse.c:128:29: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
128 | for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1) {
| ^
../../ncurses/tinfo/comp_parse.c:129:33: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
129 | for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend +
1) {
| ^
../../ncurses/tinfo/captoinfo.c: In function '_nc_infotocap':
../../ncurses/tinfo/captoinfo.c:848:27: warning: assignment discards 'const'
qualifier from pointer target type [-Wdiscarded-qualifiers]
848 | && (cp = strchr(str, '+'))) {
| ^