netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
To: netdev@vger.kernel.org
Subject: avoid compiler warning when !CONFIG_SYSCTL in netfilter dccp
Date: Thu, 29 Apr 2010 11:25:26 +0200	[thread overview]
Message-ID: <1272533126.16112.12.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 333 bytes --]

The attached trivial patch (generated against davem/net-next-2.6 as of
this morning) avoids this compiler warning:
../src/process-manager/linux/net/netfilter/nf_conntrack_proto_dccp.c: In
function ‘dccp_net_exit’:
../src/process-manager/linux/net/netfilter/nf_conntrack_proto_dccp.c:845: error: unused variable ‘dn’

Mathieu

[-- Attachment #2: nf-dccp-sysctl.patch --]
[-- Type: text/x-patch, Size: 541 bytes --]

diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c
index 5292560..cd078df 100644
--- a/net/netfilter/nf_conntrack_proto_dccp.c
+++ b/net/netfilter/nf_conntrack_proto_dccp.c
@@ -842,8 +842,8 @@ static __net_init int dccp_net_init(struct net *net)
 
 static __net_exit void dccp_net_exit(struct net *net)
 {
-	struct dccp_net *dn = dccp_pernet(net);
 #ifdef CONFIG_SYSCTL
+	struct dccp_net *dn = dccp_pernet(net);
 	unregister_net_sysctl_table(dn->sysctl_header);
 	kfree(dn->sysctl_table);
 #endif

                 reply	other threads:[~2010-04-30 18:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1272533126.16112.12.camel@localhost.localdomain \
    --to=mathieu.lacage@sophia.inria.fr \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).