[PATCH] mac80211: quiet gcc warning on 'uninitialized' chan_pwr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quiet a false gcc warning:

net/mac80211/mlme.c: In function 'ieee80211_rx_mgmt_beacon':
net/mac80211/mlme.c:903:43: warning: 'chan_pwr' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index bf19a2a..58983a8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -868,7 +868,7 @@ static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
 {
 	struct ieee80211_country_ie_triplet *triplet;
 	int chan = ieee80211_frequency_to_channel(channel->center_freq);
-	int chan_pwr;
+	int uninitialized_var(chan_pwr);
 	bool have_chan_pwr = false;
 
 	/* Invalid IE */
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux