forked from espressif/arduino-esp32
Clean warnings when all warning enabled (#2112)
* Clean warnings when all warning enabled Not used variables / functions due to debug log Dual define with different values : cores\esp32/binary.h #define B110 6 #define B1000000 64 tools/sdk/include/newlib/sys/termios.h #define B110 3 #define B1000000 23 Local variable returned in WiFiclient Secure * change due to deprecated function * Update with proper variable and label * Update esp32-hal-i2c.c * Apply changes requested * Fix warnings due to #define conflict thanks @atanisoft
This commit is contained in:
@ -439,6 +439,9 @@ uint8_t WiFiClient::connected()
|
||||
if (_connected) {
|
||||
uint8_t dummy;
|
||||
int res = recv(fd(), &dummy, 0, MSG_DONTWAIT);
|
||||
if(res < 0) {
|
||||
log_e("RES: %d", res);
|
||||
}
|
||||
switch (errno) {
|
||||
case EWOULDBLOCK:
|
||||
case ENOENT: //caused by vfs
|
||||
|
@ -118,16 +118,12 @@ uint8_t WiFiMulti::run(uint32_t connectTimeout)
|
||||
status = WiFi.status();
|
||||
}
|
||||
|
||||
IPAddress ip;
|
||||
uint8_t * mac;
|
||||
switch(status) {
|
||||
case 3:
|
||||
ip = WiFi.localIP();
|
||||
mac = WiFi.BSSID();
|
||||
log_i("[WIFI] Connecting done.");
|
||||
log_d("[WIFI] SSID: %s", WiFi.SSID().c_str());
|
||||
log_d("[WIFI] IP: %d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
|
||||
log_d("[WIFI] MAC: %02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
log_d("[WIFI] IP: %s", WiFi.localIP().toString().c_str());
|
||||
log_d("[WIFI] MAC: %s", WiFi.BSSID().toString().c_str());
|
||||
log_d("[WIFI] Channel: %d", WiFi.channel());
|
||||
break;
|
||||
case 1:
|
||||
|
@ -683,8 +683,10 @@ void WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
|
||||
smartconfig_status_t status = (smartconfig_status_t) st;
|
||||
log_d("Status: %s", sc_status_strings[st % 5]);
|
||||
if (status == SC_STATUS_GETTING_SSID_PSWD) {
|
||||
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
|
||||
smartconfig_type_t * type = (smartconfig_type_t *)result;
|
||||
log_d("Type: %s", sc_type_strings[*type % 3]);
|
||||
#endif
|
||||
} else if (status == SC_STATUS_LINK) {
|
||||
wifi_sta_config_t *sta_conf = reinterpret_cast<wifi_sta_config_t *>(result);
|
||||
log_d("SSID: %s", (char *)(sta_conf->ssid));
|
||||
@ -694,8 +696,10 @@ void WiFiSTAClass::_smartConfigCallback(uint32_t st, void* result) {
|
||||
_smartConfigDone = true;
|
||||
} else if (status == SC_STATUS_LINK_OVER) {
|
||||
if(result){
|
||||
#if ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_DEBUG
|
||||
ip4_addr_t * ip = (ip4_addr_t *)result;
|
||||
log_d("Sender IP: " IPSTR, IP2STR(ip));
|
||||
#endif
|
||||
}
|
||||
WiFi.stopSmartConfig();
|
||||
}
|
||||
|
Reference in New Issue
Block a user