From: Wang Chen <wangchen@cn.fujitsu.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: NETDEV <netdev@vger.kernel.org>
Subject: [PATCH] Variables only used in ifdef
Date: Fri, 04 Jul 2008 16:25:54 +0800 [thread overview]
Message-ID: <486DDE92.2010900@cn.fujitsu.com> (raw)
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)
{
next reply other threads:[~2008-07-04 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 8:25 Wang Chen [this message]
2008-07-25 3:15 ` [PATCH] Variables only used in ifdef Wang Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=486DDE92.2010900@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).