* [PATCH] mac80211: fix build warning
@ 2012-06-25 15:19 Alexandre Pereira da Silva
2012-06-25 15:31 ` Mohammed Shafi
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Pereira da Silva @ 2012-06-25 15:19 UTC (permalink / raw)
Cc: Alexandre Pereira da Silva, John W. Linville, Johannes Berg,
David S. Miller, linux-wireless, netdev, linux-kernel
Fix:
net/mac80211/mlme.c: In function 'ieee80211_prep_connection':
net/mac80211/mlme.c:3035:19: warning: 'sta' may be used uninitialized in
this function
Initialize sta to NULL
Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
---
net/mac80211/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 91d84cc..cfe6b43 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3032,7 +3032,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_bss *bss = (void *)cbss->priv;
- struct sta_info *sta;
+ struct sta_info *sta = NULL;
bool have_sta = false;
int err;
int ht_cfreq;
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fix build warning
2012-06-25 15:19 [PATCH] mac80211: fix build warning Alexandre Pereira da Silva
@ 2012-06-25 15:31 ` Mohammed Shafi
2012-06-25 15:33 ` Alexandre Pereira da Silva
0 siblings, 1 reply; 3+ messages in thread
From: Mohammed Shafi @ 2012-06-25 15:31 UTC (permalink / raw)
To: Alexandre Pereira da Silva
Cc: John W. Linville, Johannes Berg, David S. Miller, linux-wireless,
netdev, linux-kernel
Hi,
On Mon, Jun 25, 2012 at 8:49 PM, Alexandre Pereira da Silva
<aletes.xgr@gmail.com> wrote:
> Fix:
> net/mac80211/mlme.c: In function 'ieee80211_prep_connection':
> net/mac80211/mlme.c:3035:19: warning: 'sta' may be used uninitialized in
> this function
>
> Initialize sta to NULL
i think already fixed by and there in wireless-testing
http://www.spinics.net/lists/linux-wireless/msg92385.html
>
> Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
> ---
> net/mac80211/mlme.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 91d84cc..cfe6b43 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -3032,7 +3032,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
> struct ieee80211_local *local = sdata->local;
> struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
> struct ieee80211_bss *bss = (void *)cbss->priv;
> - struct sta_info *sta;
> + struct sta_info *sta = NULL;
> bool have_sta = false;
> int err;
> int ht_cfreq;
> --
> 1.7.10
>
> --
> 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
--
thanks,
shafi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mac80211: fix build warning
2012-06-25 15:31 ` Mohammed Shafi
@ 2012-06-25 15:33 ` Alexandre Pereira da Silva
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Pereira da Silva @ 2012-06-25 15:33 UTC (permalink / raw)
To: Mohammed Shafi
Cc: John W. Linville, Johannes Berg, David S. Miller, linux-wireless,
netdev, linux-kernel
On Mon, Jun 25, 2012 at 12:31 PM, Mohammed Shafi
<shafi.wireless@gmail.com> wrote:
> Hi,
>
> On Mon, Jun 25, 2012 at 8:49 PM, Alexandre Pereira da Silva
> <aletes.xgr@gmail.com> wrote:
>> Fix:
>> net/mac80211/mlme.c: In function 'ieee80211_prep_connection':
>> net/mac80211/mlme.c:3035:19: warning: 'sta' may be used uninitialized in
>> this function
>>
>> Initialize sta to NULL
>
> i think already fixed by and there in wireless-testing
> http://www.spinics.net/lists/linux-wireless/msg92385.html
Ok, thanks for pointing that out.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-25 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 15:19 [PATCH] mac80211: fix build warning Alexandre Pereira da Silva
2012-06-25 15:31 ` Mohammed Shafi
2012-06-25 15:33 ` Alexandre Pereira da Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox