OSDN Git Service
qcacld-3.0: Fix another uninitialized variable
Clang warns:
drivers/staging/qcacld-3.0/core/sme/src/csr/csr_util.c:1819:8: error:
variable 'phyMode2' is used uninitialized whenever 'if' condition is
false [-Werror,-Wsometimes-uninitialized]
if (eCSR_DOT11_MODE_AUTO & phyMode) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/qcacld-3.0/core/sme/src/csr/csr_util.c:1826:36: note:
uninitialized use occurs here
fMatch = csr_get_phy_mode_in_use(phyMode2, phyModeInBssDesc,
^~~~~~~~
drivers/staging/qcacld-3.0/core/sme/src/csr/csr_util.c:1819:4: note:
remove the 'if' if its condition is always true
if (eCSR_DOT11_MODE_AUTO & phyMode) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/qcacld-3.0/core/sme/src/csr/csr_util.c:1797:2: note:
variable 'phyMode2' is declared here
eCsrPhyMode phyModeInBssDesc = eCSR_DOT11_MODE_AUTO, phyMode2;
^
1 error generated.