From 44a9fed8a9e3f8ec065150c9c3c5a47ad82b9985 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Sat, 27 Feb 2021 01:50:08 +0100 Subject: [PATCH] Fix more warnings --- platformio.ini | 2 +- wled00/FX.cpp | 4 ++-- wled00/json.cpp | 4 ++-- wled00/src/dependencies/blynk/BlynkSimpleEsp.h | 3 +-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/platformio.ini b/platformio.ini index 3eb09e80f..887d2581b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -184,7 +184,7 @@ lib_deps = AsyncTCP @ 1.0.3 IRremoteESP8266 @ 2.7.3 https://github.com/lorol/LITTLEFS.git - https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.0 + https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.1 #For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line #TFT_eSPI #For use SSD1306 OLED display uncomment following diff --git a/wled00/FX.cpp b/wled00/FX.cpp index af7cead84..1f8553996 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -545,7 +545,7 @@ uint16_t WS2812FX::dissolve(uint32_t color) { } } - if (SEGENV.call > (255 - SEGMENT.speed) + 15) + if (SEGENV.call > (255 - SEGMENT.speed) + 15U) { SEGENV.aux0 = !SEGENV.aux0; SEGENV.call = 0; @@ -1034,7 +1034,7 @@ uint16_t WS2812FX::mode_running_random(void) { } SEGENV.step++; - if (SEGENV.step > ((255-SEGMENT.intensity) >> 4)) + if (SEGENV.step > (uint8_t)((255-SEGMENT.intensity) >> 4)) { SEGENV.step = 0; } diff --git a/wled00/json.cpp b/wled00/json.cpp index 3212b3b45..4b4714ac4 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -200,8 +200,8 @@ bool deserializeState(JsonObject root) receiveNotifications = udpn[F("recv")] | receiveNotifications; bool noNotification = udpn[F("nn")]; //send no notification just for this request - unsigned long timein = root[F("time")] | -1; - if (timein != -1) { + unsigned long timein = root[F("time")] | UINT32_MAX; + if (timein != UINT32_MAX) { if (millis() - ntpLastSyncTime > 50000000L) setTime(timein); if (presetsModifiedTime == 0) presetsModifiedTime = timein; } diff --git a/wled00/src/dependencies/blynk/BlynkSimpleEsp.h b/wled00/src/dependencies/blynk/BlynkSimpleEsp.h index 6697686fa..ee4d374b0 100644 --- a/wled00/src/dependencies/blynk/BlynkSimpleEsp.h +++ b/wled00/src/dependencies/blynk/BlynkSimpleEsp.h @@ -45,8 +45,7 @@ public: } BLYNK_LOG1(BLYNK_F("Connected to WiFi")); - IPAddress myip = WiFi.localIP(); - BLYNK_LOG_IP("IP: ", myip); + BLYNK_LOG_IP("IP: ", WiFi.localIP()); } void config(const char* auth,