On 04/11/2013 01:35 PM, Joe Perches wrote:
On Thu, 2013-04-11 at 11:02 -0700, Han Shen wrote:
GCC 4.8 is spitting out uninitialized-varaible warnings against "drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c".
This trivial patch just adds initialization to the variable.
Not sure this is correct.
I think the logic should be inspected instead.
ofdm_index_old[1] _is_ used uninitialized.
It appears there might be a missing
ofdm_index_old[1] = (u8) i;
as that's the same style test done in the
section above.
Maybe this:
---
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
index b793a65..56b2b2f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
@@ -717,6 +717,7 @@ static void rtl92c_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw
for (i = 0; i < OFDM_TABLE_LENGTH; i++) {
if (ele_d == (ofdmswing_table[i] &
MASKOFDM_D)) {
+ ofdm_index_old[1] = (u8) i;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING,
DBG_LOUD,
My earlier E-mail was too hasty. Joe's patch is correct. It should be marked for
stable (2.6.39+).
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html