[PATCH] examples/ipsec-secgw: fix discarded-qualifers warnings
Radu Nicolau
radu.nicolau at intel.com
Mon Mar 16 11:12:16 CET 2026
On 13-Mar-26 10:35 AM, Kevin Traynor wrote:
> glibc 2.42 has const-preserving functions.
>
> 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: stable at dpdk.org
>
> Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
> ---
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
More information about the dev
mailing list