* [PATCH 1/3 iptables] xshared: fix discards 'const' qualifier
@ 2026-02-20 9:37 Rudi Heitbaum
0 siblings, 0 replies; only message in thread
From: Rudi Heitbaum @ 2026-02-20 9:37 UTC (permalink / raw)
To: netfilter-devel; +Cc: rudi
argv is passed by parse_change_counters_rule and do_parse to parse_rule_range
as a const char. parse_rule_range modifies thepassed in argv, so pass as
non const so that it can be modified without warning.
Fixes:
iptables/xshared.c: In function 'parse_rule_range':
iptables/xshared.c:912:23: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
912 | char *colon = strchr(argv, ':'), *buffer;
| ^~~~~~
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
iptables/xshared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iptables/xshared.c b/iptables/xshared.c
index b941b8df..26e91e37 100644
--- a/iptables/xshared.c
+++ b/iptables/xshared.c
@@ -907,7 +907,7 @@ static int parse_rulenumber(const char *rule)
return rulenum;
}
-static void parse_rule_range(struct xt_cmd_parse *p, const char *argv)
+static void parse_rule_range(struct xt_cmd_parse *p, char *argv)
{
char *colon = strchr(argv, ':'), *buffer;
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-02-20 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 9:37 [PATCH 1/3 iptables] xshared: fix discards 'const' qualifier Rudi Heitbaum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.