gcc is not able to correlate chan_pwr and have_chan_pwr in ieee80211_handle_pwr_constr(), therefore it throws a warning about chan_pwr being potentially used uninitialised even if this is not true. However, initialise chan_pwr to 0 to silent the warning. Signed-off-by: Antonio Quartulli <antonio@xxxxxxxxxxxxxx> --- 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 7f073ef..43a2a7c 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1146,7 +1146,7 @@ static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata, { struct ieee80211_country_ie_triplet *triplet; int chan = ieee80211_frequency_to_channel(channel->center_freq); - int i, chan_pwr, chan_increment, new_ap_level; + int i, chan_pwr = 0, chan_increment, new_ap_level; bool have_chan_pwr = false; /* Invalid IE */ -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html