From cbf21c7cb58de4522aa167ff144655c18897f068 Mon Sep 17 00:00:00 2001 From: Max Stepanov Date: Mon, 10 Feb 2014 12:55:05 +0200 Subject: [PATCH] P2P: Avoid compiler warning in p2p_supplicant.c Initialize flag variable explicitly to avoid [-Wmaybeuninitialized] compiler warning in wpas_p2p_verify_channel(). Signed-hostap: Max Stepanov --- wpa_supplicant/p2p_supplicant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 113ef8347..1495ea426 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3461,7 +3461,7 @@ static enum chan_allowed wpas_p2p_verify_channel(struct wpa_supplicant *wpa_s, struct hostapd_hw_modes *mode, u8 channel, u8 bw) { - int flag; + int flag = 0; enum chan_allowed res, res2; res2 = res = has_channel(wpa_s->global, mode, channel, &flag);