From: Larry Finger <Larry.Finger@lwfinger.net>
To: Yunlian Jiang <yunlian@google.com>
Cc: linux-wireless@vger.kernel.org, chaoming_li@realsil.com.cn,
linville@tuxdriver.com, davem@davemloft.net
Subject: Re: [PATCH] rtlwifi: initialize local array and set value.
Date: Fri, 31 May 2013 17:08:46 -0500 [thread overview]
Message-ID: <51A91F6E.2060702@lwfinger.net> (raw)
In-Reply-To: <1370036721-18164-1-git-send-email-yunlian@google.com>
On 05/31/2013 04:45 PM, Yunlian Jiang wrote:
> GCC 4.8 is spitting out uninitialized-variable warnings against
> "drivers/net/wireless/rtlwifi/rtl8192de/dm.c".
>
> drivers/net/wireless/rtlwifi/rtl8192de/dm.c:941:31:
> error: 'ofdm_index_old[1]' may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
> rtlpriv->dm.ofdm_index[i] = ofdm_index_old[i];
>
> This patch adds initialization to the variable and properly sets its value.
> ---
> drivers/net/wireless/rtlwifi/rtl8192de/dm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
I thought this had already been fixed, but apparently not.
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Thanks,
Larry
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
> index 19a7655..47875ba 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/dm.c
> @@ -842,7 +842,7 @@ static void rtl92d_dm_txpower_tracking_callback_thermalmeter(
> long val_y, ele_c = 0;
> u8 ofdm_index[2];
> s8 cck_index = 0;
> - u8 ofdm_index_old[2];
> + u8 ofdm_index_old[2] = {0, 0};
> s8 cck_index_old = 0;
> u8 index;
> int i;
>
next prev parent reply other threads:[~2013-05-31 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 21:45 [PATCH] rtlwifi: initialize local array and set value Yunlian Jiang
2013-05-31 22:08 ` Larry Finger [this message]
2013-06-03 19:39 ` John W. Linville
[not found] ` <CAMsPy2sqS8frL+Ybq2YT83ehfZ9bSgyfwuZmfDf1R4tCre8O1g@mail.gmail.com>
2013-06-03 21:07 ` John W. Linville
[not found] ` <CAMsPy2vQzhdy9xzUzk+xWt_EXDbFmGUStJPRXvr1LG85v-NVRQ@mail.gmail.com>
[not found] ` <CAMsPy2ufj3TjdWbpPKq7QqS_ELAmqhA_Djo6dwcevLym2PCkDQ@mail.gmail.com>
2013-06-11 20:59 ` 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=51A91F6E.2060702@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=davem@davemloft.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=yunlian@google.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 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).