diff options
author | Yunlian Jiang <yunlian@google.com> | 2013-05-31 14:45:21 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-10 15:37:34 -0400 |
commit | ec71997eff2231098212a99934c0fb987a9e6b04 (patch) | |
tree | fec33fdf96b31199bc1c2b080c5e87de3d026b75 /drivers/net/wireless/rtlwifi/rtl8192de/dm.c | |
parent | 76015021aaaa288bb4dc870258e0acc4d178c950 (diff) | |
download | op-kernel-dev-ec71997eff2231098212a99934c0fb987a9e6b04.zip op-kernel-dev-ec71997eff2231098212a99934c0fb987a9e6b04.tar.gz |
rtlwifi: initialize local array and set value.
GCC 4.8 is spitting out uninitialized-variable warnings against
"drivers/net/wireless/rtlwifi/rtl8192de/dm.c".
drivers/net/wireless/rtlwifi/rtl8192de/dm.c:941:31:
error: 'ofdm_index_old[1]' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i];
This patch adds initialization to the variable and properly sets its value.
Signed-off-by: Yunlian Jiang <yunlian@google.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de/dm.c')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c index 19a7655..47875ba 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c @@ -842,7 +842,7 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter( long val_y, ele_c = 0; u8 ofdm_index[2]; s8 cck_index = 0; - u8 ofdm_index_old[2]; + u8 ofdm_index_old[2] = {0, 0}; s8 cck_index_old = 0; u8 index; int i; |