summaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-07-08 14:50:06 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-07-15 20:50:04 +0300
commitff414f31ce3750d259549c3b9eac8e855b5348f0 (patch)
tree9d3ea7dda1ea56cb7138192088a2e0d51433d032 /drivers/net/arcnet
parenta7d544d63120061f89459585f06ca44d30842a22 (diff)
downloadlinux-ff414f31ce3750d259549c3b9eac8e855b5348f0.tar.gz
linux-ff414f31ce3750d259549c3b9eac8e855b5348f0.tar.bz2
linux-ff414f31ce3750d259549c3b9eac8e855b5348f0.zip
ath10k: work around uninitialized vht_pfr variable
As clang points out, the vht_pfr is assigned to a struct member without being initialized in one case: drivers/net/wireless/ath/ath10k/mac.c:7528:7: error: variable 'vht_pfr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!ath10k_mac_can_set_bitrate_mask(ar, band, mask, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7551:20: note: uninitialized use occurs here arvif->vht_pfr = vht_pfr; ^~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7528:3: note: remove the 'if' if its condition is always true if (!ath10k_mac_can_set_bitrate_mask(ar, band, mask, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:7483:12: note: initialize the variable 'vht_pfr' to silence this warning u8 vht_pfr; Add an explicit but probably incorrect initialization here. I suspect we want a better fix here, but chose this approach to illustrate the issue. Fixes: 8b97b055dc9d ("ath10k: fix failure to set multiple fixed rate") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/arcnet')
0 files changed, 0 insertions, 0 deletions