Skip to contentSkip to conversation

avoid compiler warning when !CONFIG_SYSCTL in netfilter dccp

PATCH Mathieu Lacage 1 participant 1 message Apr 30, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

net/netfilter/nf_conntrack_proto_dccp.c +1 -1
index 5292560..cd078df 100644
@@ -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