[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5229E9D2.9060000@lwfinger.net>
Date: Fri, 06 Sep 2013 09:42:26 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Fix uninitialized variable change_inx
On 09/06/2013 07:45 AM, Geert Uytterhoeven wrote:
> drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp’:
> drivers/staging/rtl8188eu/core/rtw_wlan_util.c:634: warning: ‘change_inx’ may be used uninitialized in this function
>
> And the compiler is right: change_inx should be initialized to false.
>
> Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> ---
> drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> index 013ea48..8018edd 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c
> @@ -631,7 +631,7 @@ void WMMOnAssocRsp(struct adapter *padapter)
> inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3;
>
> if (pregpriv->wifi_spec == 1) {
> - u32 j, tmp, change_inx;
> + u32 j, tmp, change_inx = false;
>
> /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */
> for (i = 0; i < 4; i++) {
>
Acked-by: Larry Finger <Larry.Finger@...inger.net>
This warning has not shown up on my x86_64 system with gcc 4.7.2. What
architecture and gcc version were you using?
Thanks,
Larry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists