mirror of
https://https.git.savannah.gnu.org/git/coreutils.git
synced 2026-01-27 01:44:21 +00:00
numfmt: port to C23 qualifier-generic fns
* src/numfmt.c (mbsmbchr): Cast results of qualifier-generic functions to char *, to port to strict C23.
This commit is contained in:
parent
24497f2451
commit
eade022f24
@ -1387,9 +1387,9 @@ mbsmbchr (char const* s, char const* c)
|
||||
unsigned char uc = *c;
|
||||
/* GB18030 is the most restrictive for the 0x30 optimization below. */
|
||||
if (uc < 0x30 || MB_CUR_MAX == 1)
|
||||
return strchr (s, uc);
|
||||
return (char *) strchr (s, uc);
|
||||
else if (is_utf8_charset ())
|
||||
return uc < 0x80 ? strchr (s, uc) : strstr (s, c);
|
||||
return (char *) (uc < 0x80 ? strchr (s, uc) : strstr (s, c));
|
||||
else
|
||||
return *(c + 1) == '\0' ? mbschr (s, uc) : (char *) mbsstr (s, c);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user