Skip to contentSkip to conversation

net/bootp.c: Fix GCC 4.6 warning

PATCH New Anatolij Gustschin 1 participant 1 message Nov 19, 2011 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bootp.c: Fix GCC 4.6 warning

Fix:
bootp.c: In function 'BootpCopyNetParams':
bootp.c:108:11: warning: unused variable 'tmp_ip' [-Wunused-variable]

---
 net/bootp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
net/bootp.c +2 -1
index b789eec..34124b8 100644
@@ -17,6 +17,7 @@
 #ifdef CONFIG_STATUS_LED
 #include <status_led.h>
 #endif
+#include <linux/compiler.h>
 
 #define BOOTP_VENDOR_MAGIC	0x63825363	/* RFC1048 Magic Cookie		*/
 
@@ -105,7 +106,7 @@ static int BootpCheckPkt(uchar *pkt, unsigned dest, unsigned src, unsigned len)
  */
 static void BootpCopyNetParams(Bootp_t *bp)
 {
-	IPaddr_t tmp_ip;
+	__maybe_unused IPaddr_t tmp_ip;
 
 	NetCopyIP(&NetOurIP, &bp->bp_yiaddr);
 #if !defined(CONFIG_BOOTP_SERVERIP)
Signature · 1 line
1.7.5.4