netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iptables: xtables-eb: Remove const qualifier from struct option
@ 2017-11-30 13:48 Varsha Rao
  2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
  2017-11-30 14:03 ` [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Pablo Neira Ayuso
  0 siblings, 2 replies; 4+ messages in thread
From: Varsha Rao @ 2017-11-30 13:48 UTC (permalink / raw)
  To: Pablo Neira Ayuso, netfilter-devel; +Cc: Varsha Rao

As opts is reassigned multiple times, it cannot be made constant.
So remove const qualifier from structure option. This patch fixes the
following warning.

xtables-eb.c: In function ‘ebt_load_match_extensions’:
xtables-eb.c:653:7: warning: assignment discards ‘const’ qualifier
from pointer target type
  opts = ebt_original_options;

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 iptables/xtables-eb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 60ec935c..c8b5d4f3 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -247,7 +247,7 @@ static int get_current_chain(const char *chain)
 
 /* Default command line options. Do not mess around with the already
  * assigned numbers unless you know what you are doing */
-static const struct option ebt_original_options[] =
+static struct option ebt_original_options[] =
 {
 	{ "append"         , required_argument, 0, 'A' },
 	{ "insert"         , required_argument, 0, 'I' },
-- 
2.14.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-30 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-30 13:48 [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Varsha Rao
2017-11-30 13:48 ` [PATCH iptables] extensions: libxt_tcpmss: Add test case for invalid ranges Varsha Rao
2017-11-30 14:04   ` Pablo Neira Ayuso
2017-11-30 14:03 ` [PATCH] iptables: xtables-eb: Remove const qualifier from struct option Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).