]> git.karo-electronics.de Git - linux-beck.git/commit
netfilter: ipvs: avoid unused variable warnings
authorArnd Bergmann <arnd@arndb.de>
Wed, 27 Jan 2016 13:52:01 +0000 (14:52 +0100)
committerSimon Horman <horms@verge.net.au>
Thu, 18 Feb 2016 00:17:58 +0000 (09:17 +0900)
commitf6ca9f46f6615c3a87529550058d1b468c0cad89
tree4106943604294cdc90372de26d54c8e2b6e2b05c
parent2d9e9b0d05876c9e6b52cfec142e51da9b9b3f6d
netfilter: ipvs: avoid unused variable warnings

The proc_create() and remove_proc_entry() functions do not reference
their arguments when CONFIG_PROC_FS is disabled, so we get a couple
of warnings about unused variables in IPVS:

ipvs/ip_vs_app.c:608:14: warning: unused variable 'net' [-Wunused-variable]
ipvs/ip_vs_ctl.c:3950:14: warning: unused variable 'net' [-Wunused-variable]
ipvs/ip_vs_ctl.c:3994:14: warning: unused variable 'net' [-Wunused-variable]

This removes the local variables and instead looks them up separately
for each use, which obviously avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4c50a8ce2b63 ("netfilter: ipvs: avoid unused variable warning")
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_app.c
net/netfilter/ipvs/ip_vs_ctl.c