Search Linux Wireless

Re: [PATCH] mac80211: avoid uninitialized var warning in ieee80211_scan_cancel

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

 



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@xxxxxxxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux