Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Il Han <corone.il.han@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	Rusty Russell <rusty@rustcorp.com.au>,
	James Morris <jmorris@namei.org>,
	Harald Welte <laforge@gnumonks.org>,
	Jozsef Kadlecsik <kadlec@blackh>
Cc: netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
	coreteam@netfilter.org, Il Han <corone.il.han@gmail.com>
Subject: [PATCH] ip_tables.h: Add the const qualifier.
Date: Wed, 28 Sep 2011 16:32:31 +0900	[thread overview]
Message-ID: <1317195151-5278-1-git-send-email-corone.il.han@gmail.com> (raw)

We need to add the const qualifier before the struct specifier,
because its value will not be changed.
Then, the following warning would be removed.

net/ipv4/netfilter/ip_tables.c:183: warning: passing argument 1 of 'ipt_get_target' discards qualifiers from pointer target type

Add it.

Signed-off-by: Il Han <corone.il.han@gmail.com>
---
 include/linux/netfilter_ipv4/ip_tables.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 64a5d95..6e319f4 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -224,7 +224,7 @@ struct ipt_get_entries {
 
 /* Helper functions */
 static __inline__ struct xt_entry_target *
-ipt_get_target(struct ipt_entry *e)
+ipt_get_target(const struct ipt_entry *e)
 {
 	return (void *)e + e->target_offset;
 }
-- 
1.7.4.1


             reply	other threads:[~2011-09-28  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28  7:32 Il Han [this message]
2011-09-28 12:16 ` [PATCH] ip_tables.h: Add the const qualifier Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317195151-5278-1-git-send-email-corone.il.han@gmail.com \
    --to=corone.il.han@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kadlec@blackh \
    --cc=laforge@gnumonks.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox