16/03/2026 11:12, Radu Nicolau:
> 
> On 13-Mar-26 10:35 AM, Kevin Traynor wrote:
> > glibc 2.42 has const-preserving functions.

It is in glibc 2.43.

> >
> > This leads to warnings when there is a const argument
> > and an assignment to a non-const variable.
> >
> > Example with GCC 16.0.1 and glibc 2.43 on Fedora Rawhide (F45).
> >
> > /examples/ipsec-secgw/parser.c: In function ‘parse_ipv4_addr’:
> > ../examples/ipsec-secgw/parser.c:53:13:
> > warning: assignment discards ‘const’ qualifier from pointer target type
> > [-Wdiscarded-qualifiers]
> >     53 |         pch = strchr(token, '/');
> >        |             ^
> >
> > Cc: [email protected]
> >
> > Signed-off-by: Kevin Traynor <[email protected]>
> > ---
> Acked-by: Radu Nicolau <[email protected]>

Applied, thanks.


Reply via email to