From: Paul Eggert Date: Sun, 23 Nov 2025 18:50:30 +0000 (-0800) Subject: numfmt: port to C23 qualifier-generic fns X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eade022f24d6596066516c52b0dbf7c692bec293;p=thirdparty%2Fcoreutils.git numfmt: port to C23 qualifier-generic fns * src/numfmt.c (mbsmbchr): Cast results of qualifier-generic functions to char *, to port to strict C23. --- diff --git a/src/numfmt.c b/src/numfmt.c index 8fc5b478a3..d85a881b69 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -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); }