From: Jouni Malinen Date: Sun, 1 Mar 2020 18:57:14 +0000 (+0200) Subject: Silence a compiler warning in no-WEP and no-EAP builds X-Git-Tag: hostap_2_10~1708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=852d370f6568c647330b492242e5377fb7bd24c6;p=thirdparty%2Fhostap.git Silence a compiler warning in no-WEP and no-EAP builds wep_keys_set was not used in wpas_start_assoc_cb() without IEEE8021X_EAPOL, so need to make this local variable conditional on build options. Signed-off-by: Jouni Malinen --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 9d77efd4e..81ffa7264 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -3328,7 +3328,9 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit) int use_crypt, ret, bssid_changed; unsigned int cipher_pairwise, cipher_group, cipher_group_mgmt; struct wpa_driver_associate_params params; +#if defined(CONFIG_WEP) || defined(IEEE8021X_EAPOL) int wep_keys_set = 0; +#endif /* CONFIG_WEP || IEEE8021X_EAPOL */ int assoc_failed = 0; struct wpa_ssid *old_ssid; u8 prev_bssid[ETH_ALEN];