netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
To: Ying Xue <ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>,
	johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH net-next] mac80211: silent build warnings
Date: Thu, 08 Jan 2015 15:59:43 +0300	[thread overview]
Message-ID: <54AE7F3F.3070802@cogentembedded.com> (raw)
In-Reply-To: <1420700655-9427-1-git-send-email-ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>

Hello.

On 1/8/2015 10:04 AM, Ying Xue wrote:

> Silent the following build warnings:

> net/mac80211/mlme.c: In function ‘ieee80211_rx_mgmt_beacon’:
> net/mac80211/mlme.c:1348:3: warning: ‘pwr_level_cisco’ may be used uninitialized in this function [-Wuninitialized]
> net/mac80211/mlme.c:1315:6: note: ‘pwr_level_cisco’ was declared here

> Signed-off-by: Ying Xue <ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
> ---
>   net/mac80211/mlme.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 2c36c47..13b5506 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1312,7 +1312,7 @@ static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
>   {
>   	bool has_80211h_pwr = false, has_cisco_pwr = false;
>   	int chan_pwr = 0, pwr_reduction_80211h = 0;
> -	int pwr_level_cisco, pwr_level_80211h;
> +	int pwr_level_cisco = 0, pwr_level_80211h = 0;

    OK, but why are you also initializing the second variable?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-01-08 12:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  7:04 [PATCH net-next] mac80211: silent build warnings Ying Xue
     [not found] ` <1420700655-9427-1-git-send-email-ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org>
2015-01-08  7:41   ` Johannes Berg
     [not found]     ` <1420702907.2029.2.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2015-01-08  7:45       ` Ying Xue
2015-01-08 12:59   ` Sergei Shtylyov [this message]
2015-01-09  1:00     ` Ying Xue

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=54AE7F3F.3070802@cogentembedded.com \
    --to=sergei.shtylyov-m4dtvfq/zs1mrggop+s0pdbpr1lh4cv8@public.gmane.org \
    --cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ying.xue-CWA4WttNNZF54TAoqtyWWQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).