[PATCH] net: fix 2 "unused variable(s)" warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

this patch should fix 2 compiler warnings if CONFIG_INET is not set :

  CC      drivers/net/wan/syncppp.o
drivers/net/wan/syncppp.c: In function 'sppp_cisco_input':
drivers/net/wan/syncppp.c:767: warning: unused variable 'ifa'
drivers/net/wan/syncppp.c:766: warning: unused variable 'in_dev'

Signed-off-by: Toralf Förster <toralf.foerster@xxxxxx>
---
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c
index 29b4b94..c938d4c 100644
--- a/drivers/net/wan/syncppp.c
+++ b/drivers/net/wan/syncppp.c
@@ -763,10 +763,10 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb)
        case CISCO_ADDR_REQ:
                /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */
                {
-               struct in_device *in_dev;
-               struct in_ifaddr *ifa;
                __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */
 #ifdef CONFIG_INET
+               struct in_device *in_dev;
+               struct in_ifaddr *ifa;
                rcu_read_lock();
                if ((in_dev = __in_dev_get_rcu(dev)) != NULL)
                {
-- 
MfG/Sincerely

Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux