* [net:master 4/8] net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used
@ 2016-06-11 7:22 kbuild test robot
2016-06-12 3:40 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2016-06-11 7:22 UTC (permalink / raw)
Cc: kbuild-all, netdev, Ben Dooks
[-- Attachment #1: Type: text/plain, Size: 1960 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
head: 92ca8241533009e4e05a9f3999a75389678af094
commit: 0b392be9a86560dae3af2e7528f226ff465ab549 [4/8] net: ipconfig: avoid warning by making ic_addrservaddr static
config: frv-defconfig (attached as .config)
compiler: frv-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 0b392be9a86560dae3af2e7528f226ff465ab549
# save the attached .config to linux build tree
make.cross ARCH=frv
All warnings (new ones prefixed by >>):
>> net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used [-Wunused-variable]
static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
^
vim +/ic_addrservaddr +130 net/ipv4/ipconfig.c
114 | IC_BOOTP
115 #endif
116 #ifdef CONFIG_IP_PNP_DHCP
117 | IC_USE_DHCP
118 #endif
119 #ifdef IPCONFIG_RARP
120 | IC_RARP
121 #endif
122 ;
123
124 static int ic_host_name_set __initdata; /* Host name set by us? */
125
126 __be32 ic_myaddr = NONE; /* My IP address */
127 static __be32 ic_netmask = NONE; /* Netmask for local subnet */
128 __be32 ic_gateway = NONE; /* Gateway IP address */
129
> 130 static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
131
132 __be32 ic_servaddr = NONE; /* Boot server IP address */
133
134 __be32 root_server_addr = NONE; /* Address of NFS server */
135 u8 root_server_path[256] = { 0, }; /* Path to mount as root */
136
137 /* vendor class identifier */
138 static char vendor_class_identifier[253] __initdata;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 8682 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [net:master 4/8] net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used
2016-06-11 7:22 [net:master 4/8] net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used kbuild test robot
@ 2016-06-12 3:40 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-06-12 3:40 UTC (permalink / raw)
To: fengguang.wu; +Cc: kbuild-all, netdev, ben.dooks
From: kbuild test robot <fengguang.wu@intel.com>
Date: Sat, 11 Jun 2016 15:22:48 +0800
>>> net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used [-Wunused-variable]
> static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
Should be fixed by:
====================
[PATCH] ipconfig: Protect ic_addrservaddr with IPCONFIG_DYNAMIC.
>> net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used [-Wunused-variable]
static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv4/ipconfig.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index eccf9fd..1d71c40 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -127,7 +127,9 @@ __be32 ic_myaddr = NONE; /* My IP address */
static __be32 ic_netmask = NONE; /* Netmask for local subnet */
__be32 ic_gateway = NONE; /* Gateway IP address */
+#ifdef IPCONFIG_DYNAMIC
static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */
+#endif
__be32 ic_servaddr = NONE; /* Boot server IP address */
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-12 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-11 7:22 [net:master 4/8] net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used kbuild test robot
2016-06-12 3:40 ` David Miller
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.