Commit 7c8f0db0 authored by Han Shen's avatar Han Shen Committed by John W. Linville

rtl8192c:dm: Properly initialize local array and set value.

GCC 4.8 is spitting out uninitialized-variable warnings against
"drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c".  This patch adds
initialization to the variable and properly sets its value.

Signed-off-by: Han Shen  (shenhan@google.com)
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f77f8234
...@@ -669,7 +669,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -669,7 +669,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
u8 thermalvalue, delta, delta_lck, delta_iqk; u8 thermalvalue, delta, delta_lck, delta_iqk;
long ele_a, ele_d, temp_cck, val_x, value32; long ele_a, ele_d, temp_cck, val_x, value32;
long val_y, ele_c = 0; long val_y, ele_c = 0;
u8 ofdm_index[2], ofdm_index_old[2], cck_index_old = 0; u8 ofdm_index[2], ofdm_index_old[2] = {0, 0}, cck_index_old = 0;
s8 cck_index = 0; s8 cck_index = 0;
int i; int i;
bool is2t = IS_92C_SERIAL(rtlhal->version); bool is2t = IS_92C_SERIAL(rtlhal->version);
...@@ -717,7 +717,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw ...@@ -717,7 +717,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
for (i = 0; i < OFDM_TABLE_LENGTH; i++) { for (i = 0; i < OFDM_TABLE_LENGTH; i++) {
if (ele_d == (ofdmswing_table[i] & if (ele_d == (ofdmswing_table[i] &
MASKOFDM_D)) { MASKOFDM_D)) {
ofdm_index_old[1] = (u8) i;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, RT_TRACE(rtlpriv, COMP_POWER_TRACKING,
DBG_LOUD, DBG_LOUD,
"Initial pathB ele_d reg0x%x = 0x%lx, ofdm_index=0x%x\n", "Initial pathB ele_d reg0x%x = 0x%lx, ofdm_index=0x%x\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment