]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Silence a compiler warning in no-WEP and no-EAP builds
authorJouni Malinen <j@w1.fi>
Sun, 1 Mar 2020 18:57:14 +0000 (20:57 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 1 Mar 2020 18:57:14 +0000 (20:57 +0200)
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 <j@w1.fi>
wpa_supplicant/wpa_supplicant.c

index 9d77efd4e98682774aaaf86e74c9566066bef96c..81ffa7264646329471d264e1fcdd882f906997f9 100644 (file)
@@ -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];