* [PATCH] netfilter: fix unused variable warning in xt_hashlimit.c
@ 2012-01-11 0:52 Stephen Rothwell
2012-01-16 12:39 ` Pablo Neira Ayuso
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2012-01-11 0:52 UTC (permalink / raw)
To: Pablo Neira Ayuso, Patrick McHardy
Cc: David S. Miller, netfilter-devel, netfilter, coreteam, netdev,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]
Fixes this warning when CONFIG_IP6_NF_IPTABLES is not enabled:
net/netfilter/xt_hashlimit.c: In function ‘hashlimit_init_dst’:
net/netfilter/xt_hashlimit.c:448:9: warning: unused variable ‘frag_off’ [-Wunused-variable]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
net/netfilter/xt_hashlimit.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Sorry for the wide posting, but the MAINTAINERS file is not clear about
which mailing lists are relevant.
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c
index 8e49921..d95f9c9 100644
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -445,7 +445,6 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
{
__be16 _ports[2], *ports;
u8 nexthdr;
- __be16 frag_off;
int poff;
memset(dst, 0, sizeof(*dst));
@@ -466,6 +465,9 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
break;
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
case NFPROTO_IPV6:
+ {
+ __be16 frag_off;
+
if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) {
memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr,
sizeof(dst->ip6.dst));
@@ -485,6 +487,7 @@ hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo,
if ((int)protoff < 0)
return -1;
break;
+ }
#endif
default:
BUG();
--
1.7.8.197.g73c6b
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netfilter: fix unused variable warning in xt_hashlimit.c
2012-01-11 0:52 [PATCH] netfilter: fix unused variable warning in xt_hashlimit.c Stephen Rothwell
@ 2012-01-16 12:39 ` Pablo Neira Ayuso
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2012-01-16 12:39 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Patrick McHardy, David S. Miller, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
On Wed, Jan 11, 2012 at 11:52:17AM +1100, Stephen Rothwell wrote:
> Fixes this warning when CONFIG_IP6_NF_IPTABLES is not enabled:
>
> net/netfilter/xt_hashlimit.c: In function ‘hashlimit_init_dst’:
> net/netfilter/xt_hashlimit.c:448:9: warning: unused variable ‘frag_off’ [-Wunused-variable]
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netfilter: fix unused variable warning in xt_hashlimit.c
@ 2012-01-16 12:39 ` Pablo Neira Ayuso
0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2012-01-16 12:39 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Patrick McHardy, David S. Miller, netfilter-devel, netfilter,
coreteam, netdev, linux-kernel
On Wed, Jan 11, 2012 at 11:52:17AM +1100, Stephen Rothwell wrote:
> Fixes this warning when CONFIG_IP6_NF_IPTABLES is not enabled:
>
> net/netfilter/xt_hashlimit.c: In function ‘hashlimit_init_dst’:
> net/netfilter/xt_hashlimit.c:448:9: warning: unused variable ‘frag_off’ [-Wunused-variable]
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-16 12:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-11 0:52 [PATCH] netfilter: fix unused variable warning in xt_hashlimit.c Stephen Rothwell
2012-01-16 12:39 ` Pablo Neira Ayuso
2012-01-16 12:39 ` Pablo Neira Ayuso
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.