* [PATCH] rtlwifi: initialize local array and set value.
@ 2013-05-31 21:45 Yunlian Jiang
2013-05-31 22:08 ` Larry Finger
2013-06-03 19:39 ` John W. Linville
0 siblings, 2 replies; 5+ messages in thread
From: Yunlian Jiang @ 2013-05-31 21:45 UTC (permalink / raw)
To: linux-wireless; +Cc: Larry.Finger, chaoming_li, linville, davem, yunlian
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(-)
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;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] rtlwifi: initialize local array and set value. 2013-05-31 21:45 [PATCH] rtlwifi: initialize local array and set value Yunlian Jiang @ 2013-05-31 22:08 ` Larry Finger 2013-06-03 19:39 ` John W. Linville 1 sibling, 0 replies; 5+ messages in thread From: Larry Finger @ 2013-05-31 22:08 UTC (permalink / raw) To: Yunlian Jiang; +Cc: linux-wireless, chaoming_li, linville, davem 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; > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] rtlwifi: initialize local array and set value. 2013-05-31 21:45 [PATCH] rtlwifi: initialize local array and set value Yunlian Jiang 2013-05-31 22:08 ` Larry Finger @ 2013-06-03 19:39 ` John W. Linville [not found] ` <CAMsPy2sqS8frL+Ybq2YT83ehfZ9bSgyfwuZmfDf1R4tCre8O1g@mail.gmail.com> 1 sibling, 1 reply; 5+ messages in thread From: John W. Linville @ 2013-06-03 19:39 UTC (permalink / raw) To: Yunlian Jiang; +Cc: linux-wireless, Larry.Finger, chaoming_li, davem This patch is missing a Signed-off-by line... On Fri, May 31, 2013 at 02:45:21PM -0700, 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(-) > > 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; > -- > 1.8.2.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAMsPy2sqS8frL+Ybq2YT83ehfZ9bSgyfwuZmfDf1R4tCre8O1g@mail.gmail.com>]
* Re: [PATCH] rtlwifi: initialize local array and set value. [not found] ` <CAMsPy2sqS8frL+Ybq2YT83ehfZ9bSgyfwuZmfDf1R4tCre8O1g@mail.gmail.com> @ 2013-06-03 21:07 ` John W. Linville [not found] ` <CAMsPy2vQzhdy9xzUzk+xWt_EXDbFmGUStJPRXvr1LG85v-NVRQ@mail.gmail.com> 0 siblings, 1 reply; 5+ messages in thread From: John W. Linville @ 2013-06-03 21:07 UTC (permalink / raw) To: Yunlian Jiang; +Cc: linux-wireless, Larry.Finger, chaoming_li, davem That would be perfectly fine. Or, you can just acknowledge that you intended for it to be there and I can add it myself. John On Mon, Jun 03, 2013 at 12:48:31PM -0700, Yunlian Jiang wrote: > Sorry, can I re-upload the patch and set Signed-off-by me? > > Thanks > > > On Mon, Jun 3, 2013 at 12:39 PM, John W. Linville <linville@tuxdriver.com>wrote: > > > This patch is missing a Signed-off-by line... > > > > On Fri, May 31, 2013 at 02:45:21PM -0700, 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(-) > > > > > > 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; > > > -- > > > 1.8.2.1 > > > > > > -- > > > To unsubscribe from this list: send the line "unsubscribe > > linux-wireless" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > > > -- > > John W. Linville Someday the world will need a hero, and you > > linville@tuxdriver.com might be all we have. Be ready. > > -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CAMsPy2vQzhdy9xzUzk+xWt_EXDbFmGUStJPRXvr1LG85v-NVRQ@mail.gmail.com>]
[parent not found: <CAMsPy2ufj3TjdWbpPKq7QqS_ELAmqhA_Djo6dwcevLym2PCkDQ@mail.gmail.com>]
* Re: [PATCH] rtlwifi: initialize local array and set value. [not found] ` <CAMsPy2ufj3TjdWbpPKq7QqS_ELAmqhA_Djo6dwcevLym2PCkDQ@mail.gmail.com> @ 2013-06-11 20:59 ` John W. Linville 0 siblings, 0 replies; 5+ messages in thread From: John W. Linville @ 2013-06-11 20:59 UTC (permalink / raw) To: Yunlian Jiang; +Cc: linux-wireless, Larry.Finger, chaoming_li, davem It's in wireless-next... commit ec71997eff2231098212a99934c0fb987a9e6b04 Author: Yunlian Jiang <yunlian@google.com> Date: Fri May 31 14:45:21 2013 -0700 rtlwifi: initialize local array and set value. 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. Signed-off-by: Yunlian Jiang <yunlian@google.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> On Tue, Jun 11, 2013 at 01:00:00PM -0700, Yunlian Jiang wrote: > John, > Any update for this patch? > Thanks > > > On Mon, Jun 3, 2013 at 2:17 PM, Yunlian Jiang <yunlian@google.com> wrote: > > > John, > > Yes, I intended for it to be there and please add it. > > > > Thanks > > > > > > On Mon, Jun 3, 2013 at 2:07 PM, John W. Linville <linville@tuxdriver.com>wrote: > > > >> That would be perfectly fine. Or, you can just acknowledge that you > >> intended for it to be there and I can add it myself. > >> > >> John > >> > >> On Mon, Jun 03, 2013 at 12:48:31PM -0700, Yunlian Jiang wrote: > >> > Sorry, can I re-upload the patch and set Signed-off-by me? > >> > > >> > Thanks > >> > > >> > > >> > On Mon, Jun 3, 2013 at 12:39 PM, John W. Linville < > >> linville@tuxdriver.com>wrote: > >> > > >> > > This patch is missing a Signed-off-by line... > >> > > > >> > > On Fri, May 31, 2013 at 02:45:21PM -0700, 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(-) > >> > > > > >> > > > 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; > >> > > > -- > >> > > > 1.8.2.1 > >> > > > > >> > > > -- > >> > > > To unsubscribe from this list: send the line "unsubscribe > >> > > linux-wireless" in > >> > > > the body of a message to majordomo@vger.kernel.org > >> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > >> > > > > >> > > > >> > > -- > >> > > John W. Linville Someday the world will need a hero, > >> and you > >> > > linville@tuxdriver.com might be all we have. Be > >> ready. > >> > > > >> > >> -- > >> John W. Linville Someday the world will need a hero, and > >> you > >> linville@tuxdriver.com might be all we have. Be ready. > >> > > > > -- John W. Linville Someday the world will need a hero, and you linville@tuxdriver.com might be all we have. Be ready. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-11 21:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-31 21:45 [PATCH] rtlwifi: initialize local array and set value Yunlian Jiang
2013-05-31 22:08 ` Larry Finger
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
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).