* [PATCH] Variables only used in ifdef
@ 2008-07-04 8:25 Wang Chen
2008-07-25 3:15 ` Wang Chen
0 siblings, 1 reply; 2+ messages in thread
From: Wang Chen @ 2008-07-04 8:25 UTC (permalink / raw)
To: Jeff Garzik; +Cc: NETDEV
Move the variables which only used in #ifdef to where they should be.
Otherwise, "defined but not used" compile warning will go out.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
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)
{
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Variables only used in ifdef
2008-07-04 8:25 [PATCH] Variables only used in ifdef Wang Chen
@ 2008-07-25 3:15 ` Wang Chen
0 siblings, 0 replies; 2+ messages in thread
From: Wang Chen @ 2008-07-25 3:15 UTC (permalink / raw)
To: Jeff Garzik; +Cc: NETDEV
Wang Chen said the following on 2008-7-4 16:25:
> Move the variables which only used in #ifdef to where they should be.
> Otherwise, "defined but not used" compile warning will go out.
>
> Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
> ---
> 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)
> {
>
Jeff, will you take this?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-25 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-04 8:25 [PATCH] Variables only used in ifdef Wang Chen
2008-07-25 3:15 ` Wang Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).