[patch 1/6] otus: dont mix declarations and code

From: horms
Date: Fri Jan 08 2010 - 03:01:54 EST


$ 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@xxxxxxxxxxxx>

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:

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/