public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH] mac80211: quiet gcc warning on 'uninitialized' chan_pwr
Date: Fri, 07 Sep 2012 01:42:29 +0000	[thread overview]
Message-ID: <20120907014229.GA14034@localhost> (raw)

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 */

                 reply	other threads:[~2012-09-07  1:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120907014229.GA14034@localhost \
    --to=fengguang.wu@intel.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox