Thread (6 messages) 6 messages, 4 authors, 2017-07-28

Re: [PATCH] mwifiex: fix compile warning of unused variable

From: Shawn Lin <shawn.lin@rock-chips.com>
Date: 2017-07-06 08:18:55
Also in: linux-wireless

Hi Kalle,

On 2017/7/6 15:57, Kalle Valo wrote:
Shawn Lin [off-list ref] writes:
quoted
We got a compile warning shows below:

drivers/net/wireless/marvell/mwifiex/sdio.c: In function
'mwifiex_sdio_remove':
drivers/net/wireless/marvell/mwifiex/sdio.c:377:6: warning: variable
'ret' set but not used [-Wunused-but-set-variable]

Per the code, it didn't check if mwifiex_sdio_read_fw_status
finish successfully. We should at least check the return of
mwifiex_sdio_read_fw_status, otherwise the following check of
firmware_stat and adapter->mfg_mode is pointless as the device
is probably dead.
I don't see that warning, any ideas why? My compiler:

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
I was using gcc-arm-eabi-4.8- , but it doesn't matter.

Could you add W=1 to compile the code, for instance, "make W=1  -j32"
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help