From: Karel Zak Date: Thu, 27 Nov 2025 15:47:46 +0000 (+0100) Subject: enosys: fix const qualifier warning in parse_block X-Git-Tag: v2.41.3~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d3ab47ab080cd37bd4fadf6d5ad879bde528603;p=thirdparty%2Futil-linux.git enosys: fix const qualifier warning in parse_block Fix const qualifier discarded warning in parse_block(). This warning is reported by gcc 15 which defaults to the C23 standard. The strchr() function returns a pointer into a const string, so the receiving variable must be declared as const char *. Signed-off-by: Karel Zak (cherry picked from commit 70379d240dcf975d140160bb4c14cf1b3fe70bcc) --- diff --git a/misc-utils/enosys.c b/misc-utils/enosys.c index 6afb27107..5f780ae98 100644 --- a/misc-utils/enosys.c +++ b/misc-utils/enosys.c @@ -105,7 +105,7 @@ static struct blocked_number *parse_block(const char *s, int ret, const struct s struct blocked_number *blocked; const char *name, *error_name; long blocked_number; - char *colon; + const char *colon; bool found; size_t i;