linux-sg2042/drivers/staging/rtl8192u
Arnd Bergmann 5d43dfdba0 staging: rtl8192x: fix bogus maybe-uninitialized warning
The rtllib_rx_extract_addr() is supposed to set up the mac addresses
for four possible cases, based on two bits of input data. For
some reason, gcc decides that it's possible that none of the these
four cases apply and the addresses remain uninitialized:

drivers/staging/rtl8192e/rtllib_rx.c: In function ‘rtllib_rx_InfraAdhoc’:
include/linux/etherdevice.h:316:61: error: ‘*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: ‘*((void *)&dst+4)’ was declared here
ded from /git/arm-soc/drivers/staging/rtl8192e/rtllib_rx.c:40:0:
include/linux/etherdevice.h:316:36: error: ‘dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/staging/rtl8192e/rtllib_rx.c:1318:5: note: ‘dst’ was declared here

This warning is clearly nonsense, but changing the last case into
'default' makes it obvious to the compiler too, which avoids the
warning and probably leads to better object code too.

As the same warning appears in other files that have the exact
same code, I'm fixing it in both rtl8192e and rtl8192u, even
though I did not observe it for the latter.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 09:40:44 +02:00
..
ieee80211 staging: rtl8192x: fix bogus maybe-uninitialized warning 2016-10-25 09:40:44 +02:00
Kconfig
Makefile
authors
changes
copying
r819xU_cmdpkt.c
r819xU_cmdpkt.h rtl8192u: BIT() macro cleanup 2015-10-13 10:32:40 -07:00
r819xU_firmware.c staging: rtl8192u: r819xU_firmware: fix coding style 2015-08-03 17:48:17 -07:00
r819xU_firmware.h
r819xU_firmware_img.c
r819xU_firmware_img.h
r819xU_phy.c staging: rtl8192u: use to_delayed_work 2016-02-07 19:56:45 -08:00
r819xU_phy.h staging: rtl8192u: Remove unnecessary externs 2015-08-14 18:51:57 -07:00
r819xU_phyreg.h
r8180_93cx6.c staging: rtl8192u: propagate errors in eprom_read 2016-06-18 19:49:02 -07:00
r8180_93cx6.h staging: rtl8192u: propagate errors in eprom_read 2016-06-18 19:49:02 -07:00
r8190_rtl8256.c Staging: rtl8192u: Remove unnecessary semicolon. 2016-03-28 07:30:36 -07:00
r8190_rtl8256.h staging: rtl8192u: Remove unnecessary externs 2015-08-14 18:51:57 -07:00
r8192U.h staging/rtl8192u: use s8 instead of char 2016-08-21 18:21:28 +02:00
r8192U_core.c staging: rtl8192u: remove unused functions in r8192U_core.c 2016-09-23 19:00:44 +02:00
r8192U_dm.c Staging: rtl8192u: Remove useless type conversion 2016-09-20 13:35:45 +02:00
r8192U_dm.h staging: rtl8192u: Remove unnecessary externs 2015-08-14 18:51:57 -07:00
r8192U_hw.h rtl8192u: BIT() macro cleanup 2015-10-13 10:32:40 -07:00
r8192U_wx.c rtl8192u: r8192_priv: Replace semaphore wx_sem with mutex 2016-06-18 19:50:48 -07:00
r8192U_wx.h staging: rtl8192u: Remove unnecessary externs 2015-08-14 18:51:57 -07:00