From: Larry Finger <Larry.Finger@lwfinger.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Fix uninitialized variable change_inx
Date: Fri, 06 Sep 2013 09:42:26 -0500 [thread overview]
Message-ID: <5229E9D2.9060000@lwfinger.net> (raw)
In-Reply-To: <1378471536-7169-1-git-send-email-geert@linux-m68k.org>
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@linux-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@lwfinger.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
next prev parent reply other threads:[~2013-09-06 14:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 12:45 Geert Uytterhoeven
2013-09-06 14:42 ` Larry Finger [this message]
2013-09-06 14:52 ` Geert Uytterhoeven
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=5229E9D2.9060000@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®