lkml.org 
[lkml]   [2012]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2 8/9] isdn: Remove unused variable causing a compile build warning
Thanks for reviewing Paul. Here's the result:

Author: Lee Jones <lee.jones@linaro.org>
Date: Sat Nov 3 22:06:02 2012 +0100

isdn: Encapsulate variable 's' in same CONFIG_NETDEVICES guards as code using it

In the current case, variable 's' of type 'char *' is defined but then
not used if !CONFIG_NETDEVICES, casing the compile-time warning below.
In this change we surround the declaration using the same guards as
the pre-processed code which makes use of it.

This patch fixes:
drivers/isdn/i4l/isdn_common.c: In function ‘isdn_ioctl’:
drivers/isdn/i4l/isdn_common.c:1278:8: warning: unused variable ‘s’ [-Wunused-variable]

Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 8c610fa..2875f31 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1275,7 +1275,6 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
int ret;
int i;
char __user *p;
- char *s;
union iocpar {
char name[10];
char bname[22];
@@ -1284,6 +1283,9 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
isdn_net_ioctl_cfg cfg;
} iocpar;
void __user *argp = (void __user *)arg;
+#ifdef CONFIG_NETDEVICES
+ char *s;
+#endif

#define name iocpar.name
#define bname iocpar.bname
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2012-11-04 12:21    [W:0.059 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site