]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: Remove const qualifier from struct option.
authorVarsha Rao <rvarsha016@gmail.com>
Thu, 21 Dec 2017 03:35:45 +0000 (09:05 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 21 Dec 2017 08:12:27 +0000 (09:12 +0100)
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 <rvarsha016@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/ip6tables.c
iptables/iptables.c
iptables/xtables.c

index 0f6fa31aefd506a77f81b719a922e4d6a2c8b176..49bd006fb22f67577658fa850f5597d19566a08a 100644 (file)
@@ -78,7 +78,7 @@ static const char optflags[]
 
 static const char unsupported_rev[] = " [unsupported revision]";
 
-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'},
index e930fe2677489ace695b77c5ebd330f01c5bef31..69d19feca1c22a89d551b29247199d890466e82a 100644 (file)
@@ -75,7 +75,7 @@ static const char optflags[]
 
 static const char unsupported_rev[] = " [unsupported revision]";
 
-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'},
index aebe7d77acf75cd554ebd2e8dba216e413fcb8bc..ac1132541dddafc1b2c6387d703a288b142ea39d 100644 (file)
@@ -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'},