lkml.org 
[lkml]   [2010]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 1/6] otus: dont mix declarations and code
$ gcc (Debian 4.4.2-8) 4.4.2
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make
...
drivers/staging/otus/ioctl.c: In function 'usbdrv_wpa_ioctl':
drivers/staging/otus/ioctl.c:2253: warning: ISO C90 forbids mixed declarations and code
...

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6/drivers/staging/otus/ioctl.c
===================================================================
--- linux-2.6.orig/drivers/staging/otus/ioctl.c 2010-01-08 16:52:19.000000000 +1100
+++ linux-2.6/drivers/staging/otus/ioctl.c 2010-01-08 17:07:55.000000000 +1100
@@ -2227,7 +2227,8 @@ int usbdrv_wpa_ioctl(struct net_device *
case ZD_CMD_SCAN_REQ:
printk(KERN_ERR "usbdrv_wpa_ioctl: ZD_CMD_SCAN_REQ\n");
break;
- case ZD_CMD_SET_GENERIC_ELEMENT:
+ case ZD_CMD_SET_GENERIC_ELEMENT: {
+ u8_t len, *wpaie;
printk(KERN_ERR "usbdrv_wpa_ioctl:"
" ZD_CMD_SET_GENERIC_ELEMENT\n");

@@ -2250,8 +2251,8 @@ int usbdrv_wpa_ioctl(struct net_device *
/* zfiWlanSetWpaIe(dev, zdparm->u.generic_elem.data,
* zdparm->u.generic_elem.len);
*/
- u8_t len = zdparm->u.generic_elem.len;
- u8_t *wpaie = (u8_t *)zdparm->u.generic_elem.data;
+ len = zdparm->u.generic_elem.len;
+ wpaie = zdparm->u.generic_elem.data;

printk(KERN_ERR "wd->ap.wpaLen : % d\n", len);

@@ -2273,6 +2274,7 @@ int usbdrv_wpa_ioctl(struct net_device *
* #endif
*/
break;
+ }

/* #ifdef ZM_HOSTAPD_SUPPORT */
case ZD_CMD_GET_TSC:


\
 
 \ /
  Last update: 2010-01-08 09:03    [W:2.959 / U:4.552 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site