kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: quiet gcc warning on 'uninitialized' chan_pwr
@ 2012-09-07  1:42 Fengguang Wu
  0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2012-09-07  1:42 UTC (permalink / raw)
  To: kernel-janitors

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@intel.com>
---
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 */

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-07  1:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07  1:42 [PATCH] mac80211: quiet gcc warning on 'uninitialized' chan_pwr Fengguang Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).