feat(wps): fix warning issues

This commit is contained in:
Chen Wen
2019-09-11 20:38:53 +08:00
parent e0c94384b6
commit 6ac71ff766
2 changed files with 3 additions and 9 deletions

View File

@ -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
CFLAGS += -DEMBEDDED_SUPP -D__ets__ -DESPRESSIF_USE -DCONFIG_WPS2 -DCONFIG_WPS_PIN -DUSE_WPS_TASK -DESP8266_WORKAROUND -Wno-strict-aliasing

View File

@ -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;
}