diff --git a/components/wpa_supplicant/component.mk b/components/wpa_supplicant/component.mk index 3370ea0d..27788b93 100644 --- a/components/wpa_supplicant/component.mk +++ b/components/wpa_supplicant/component.mk @@ -1,4 +1,4 @@ COMPONENT_ADD_INCLUDEDIRS := include include/wps port/include COMPONENT_SRCDIRS := src/crypto src/wps src/fast_crypto port -CFLAGS += -DEMBEDDED_SUPP -D__ets__ -DESPRESSIF_USE -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESP8266_WORKAROUND -Wno-unused-but-set-variable -Wno-empty-body \ No newline at end of file +CFLAGS += -DEMBEDDED_SUPP -D__ets__ -DESPRESSIF_USE -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESP8266_WORKAROUND -Wno-strict-aliasing \ No newline at end of file diff --git a/components/wpa_supplicant/src/wps/wps_registrar.c b/components/wpa_supplicant/src/wps/wps_registrar.c index e9c4b0b9..3063a092 100644 --- a/components/wpa_supplicant/src/wps/wps_registrar.c +++ b/components/wpa_supplicant/src/wps/wps_registrar.c @@ -2716,15 +2716,12 @@ static int wps_process_wps_state(struct wps_data* wps, const u8* state) static int wps_process_assoc_state(struct wps_data* wps, const u8* assoc) { - u16 a = 0; - if (assoc == NULL) { wpa_printf(MSG_DEBUG, "WPS: No Association State received"); return -1; } - a = WPA_GET_BE16(assoc); - wpa_printf(MSG_DEBUG, "WPS: Enrollee Association State %d", a); + wpa_printf(MSG_DEBUG, "WPS: Enrollee Association State %d", WPA_GET_BE16(assoc)); return 0; } @@ -2732,15 +2729,12 @@ static int wps_process_assoc_state(struct wps_data* wps, const u8* assoc) static int wps_process_config_error(struct wps_data* wps, const u8* err) { - u16 e = 0; - if (err == NULL) { wpa_printf(MSG_DEBUG, "WPS: No Configuration Error received"); return -1; } - e = WPA_GET_BE16(err); - wpa_printf(MSG_DEBUG, "WPS: Enrollee Configuration Error %d", e); + wpa_printf(MSG_DEBUG, "WPS: Enrollee Configuration Error %d", WPA_GET_BE16(err)); return 0; }