From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: [PATCH] netfilter: ipvs: avoid unused variable warning Date: Mon, 30 Nov 2015 10:54:14 +0100 Message-ID: <9616810.SPqCgIbKt5@wuerfel> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Julian Anastasov , Pablo Neira Ayuso , Patrick McHardy , Jozsef Kadlecsik , "David S. Miller" , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org To: Wensong Zhang , Simon Horman , lvs-devel@vger.kernel.org Return-path: Sender: lvs-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org When CONFIG_PROC_FS is disabled, the local 'net' variable in ip_vs_app_net_init becomes unused, as gcc warns: net/netfilter/ipvs/ip_vs_app.c: In function 'ip_vs_app_net_init': net/netfilter/ipvs/ip_vs_app.c:608:14: warning: unused variable 'net' [-Wunused-variable] This removes the line by moving the pointer dereference into the user of the variable. Signed-off-by: Arnd Bergmann diff --git a/net/netfilter/ipvs/ip_vs_app.c b/net/netfilter/ipvs/ip_vs_app.c index 0328f7250693..e5422d3db501 100644 --- a/net/netfilter/ipvs/ip_vs_app.c +++ b/net/netfilter/ipvs/ip_vs_app.c @@ -614,8 +614,6 @@ int __net_init ip_vs_app_net_init(struct netns_ipvs *ipvs) void __net_exit ip_vs_app_net_cleanup(struct netns_ipvs *ipvs) { - struct net *net = ipvs->net;