iptables user tools: const variable being in functions
I was unable to log the following bug on bugzilla.
There are an additional 2 discard const warnings when building iptables-1.8.12 with glibc-2.43 and gcc-16.
Both of these warnings are occurring with the passed in const being changed in the function.
../../libxtables/xtables.c: In function 'xtables_parse_mac_and_mask':../../libxtables/xtables.c:2307:17: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
2307 | if ( (p = strrchr(from, '/')) != NULL) {
| ^../../extensions/libxt_TCPOPTSTRIP.c: In function 'parse_list':../../extensions/libxt_TCPOPTSTRIP.c:78:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
78 | p = strchr(arg, ',');
| ^
The other warnings have been addressed in:
- https://lore.kernel.org/netfilter-devel/aZgragyOBo2vEOUe@6f548583a531/T/#u
- https://lore.kernel.org/netfilter-devel/aZgrmmEUEQ1L_Sjx@6f548583a531/T/#u
- https://lore.kernel.org/netfilter-devel/aZgrw5yXNZIaRXfV@6f548583a531/T/#u
Regards
Rudi