Parcourir la source

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 <Max.Stepanov@intel.com>
Max Stepanov il y a 11 ans
Parent
commit
cbf21c7cb5
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      wpa_supplicant/p2p_supplicant.c

+ 1 - 1
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);