From 7536415168c2fab15dd80d99e94dc36f4387c42d Mon Sep 17 00:00:00 2001 From: Varsha Rao Date: Thu, 21 Dec 2017 09:05:45 +0530 Subject: iptables: Remove const qualifier from struct option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As opts is reassigned multiple times, it cannot be made constant. So remove const qualifier from structure option. This patch fixes the following warning: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] .orig_opts = original_opts, Signed-off-by: Varsha Rao Signed-off-by: Pablo Neira Ayuso --- iptables/xtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/xtables.c') diff --git a/iptables/xtables.c b/iptables/xtables.c index aebe7d77..ac113254 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -59,7 +59,7 @@ static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z', static const char optflags[] = { 'n', 's', 'd', 'p', 'j', 'v', 'x', 'i', 'o', '0', 'c', 'f'}; -static const struct option original_opts[] = { +static struct option original_opts[] = { {.name = "append", .has_arg = 1, .val = 'A'}, {.name = "delete", .has_arg = 1, .val = 'D'}, {.name = "check", .has_arg = 1, .val = 'C'}, -- cgit v1.2.3