mac80211: fix build warning
Subsystems (3)
PATCH 1/1 mac80211: fix build warning
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
--- net/mac80211/mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/mlme.c +1 -1
@@ -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;
Signature · 1 line
1.7.10
Hi,
Quoted 6 lines · Alexandre Pereira da Silva
Fix:
net/mac80211/mlme.c: In function 'ieee80211_prep_connection':net/mac80211/mlme.c:3035:19: warning: 'sta' may be used uninitialized in this functionInitialize sta to NULL
i think already fixed by and there in wireless-testing
http://www.spinics.net/lists/linux-wireless/msg92385.html
Quoted 26 lines
Signed-off-by Alexandre Pereira da Silva <[email protected]>---
net/mac80211/mlme.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)net/mac80211/mlme.c +1
-2@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
thanks, shafi
Quoted 9 lines · Mohammed Shafi
Hi,
Quoted 5 lines · Alexandre Pereira da Silva
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
Quoted 4 lines
Quoted 1 line
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.