From: Larry Finger <Larry.Finger@lwfinger.net>
To: Alessio Igor Bogani <abogani@kernel.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>,
linux-wireless@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Tim Bird <tim.bird@am.sony.com>
Subject: Re: [PATCH] rtlwifi: make gcc happy
Date: Sun, 27 Feb 2011 15:58:04 -0600 [thread overview]
Message-ID: <4D6AC8EC.1040104@lwfinger.net> (raw)
In-Reply-To: <1298841390-1194-1-git-send-email-abogani@kernel.org>
On 02/27/2011 03:16 PM, Alessio Igor Bogani wrote:
> drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
> drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
> drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
> drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function
>
> Signed-off-by: Alessio Igor Bogani<abogani@kernel.org>
> ---
> drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
> index bf5852f..593eb8e 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
> @@ -252,9 +252,9 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw,
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> struct phy_sts_cck_8192s_t *cck_buf;
> s8 rx_pwr_all, rx_pwr[4];
> - u8 rf_rx_num, evm, pwdb_all;
> + u8 evm, pwdb_all, rf_rx_num = 0;
> u8 i, max_spatial_stream;
> - u32 rssi, total_rssi;
> + u32 rssi, total_rssi = 0;
> bool is_cck_rate;
>
> is_cck_rate = RX_HAL_IS_CCK_RATE(pdesc);
> @@ -463,7 +463,7 @@ static void _rtl92ce_update_rxsignalstatistics(struct ieee80211_hw *hw,
> struct rtl_stats *pstats)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> - int weighting;
> + int weighting = 0;
>
> if (rtlpriv->stats.recv_signal_power == 0)
> rtlpriv->stats.recv_signal_power = pstats->recvsignalpower;
ACK. What architecture and compiler version are you using? On x86_64, gcc 4.5.1
does not show these warnings.
Larry
next prev parent reply other threads:[~2011-02-27 21:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-27 21:16 [PATCH] rtlwifi: make gcc happy Alessio Igor Bogani
2011-02-27 21:58 ` Larry Finger [this message]
2011-02-28 0:38 ` Dan Carpenter
2011-02-28 8:11 ` [PATCH] rtlwifi: fix places where uninitialized data is used Alessio Igor Bogani
2011-02-28 18:31 ` Larry Finger
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=4D6AC8EC.1040104@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=abogani@kernel.org \
--cc=chaoming_li@realsil.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tim.bird@am.sony.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).