All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: Re: [PATCH] mac80211: avoid uninitialized var warning in ieee80211_scan_cancel
Date: Thu, 7 Oct 2010 08:15:16 +0200	[thread overview]
Message-ID: <20101007061515.GA25616@redhat.com> (raw)
In-Reply-To: <1286397743-21687-1-git-send-email-linville@tuxdriver.com>

On Wed, Oct 06, 2010 at 04:42:23PM -0400, John W. Linville wrote:
> net/mac80211/scan.c: In function ‘ieee80211_scan_cancel’:
> net/mac80211/scan.c:794: warning: ‘finish’ may be used uninitialized in this function
> 
> Signed-off-by: John W. Linville <linville@tuxdriver.com>

Hi John

What compiler are you using? I have no warning with gcc 4.4.4 from RHEL6.
That's correct, as "finish" variable can not be uninitialized, because is used
only when abortscan == true;

> +	bool finish = false;
>  
>  	/*
>  	 * We are only canceling software scan, or deferred scan that was not
> @@ -818,7 +819,7 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
>  	if (abortscan) {
>  		/* The scan is canceled, but stop work from being pending */
>  		cancel_delayed_work_sync(&local->scan_work);
> -		if (finish)
> -			__ieee80211_scan_completed_finish(&local->hw, false);
>  	}
> +	if (finish)
> +		__ieee80211_scan_completed_finish(&local->hw, false);
>  }

I have nothing against the patch, but this seems to be compiler problem,
not our code.

Stanislaw

  reply	other threads:[~2010-10-07  6:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 20:42 [PATCH] mac80211: avoid uninitialized var warning in ieee80211_scan_cancel John W. Linville
2010-10-07  6:15 ` Stanislaw Gruszka [this message]
2010-10-07 13:06   ` John W. Linville

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=20101007061515.GA25616@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.