From 437c72cfa9050f3457aa97df6788be0e2bd2e32c Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Fri, 12 Nov 2021 09:13:01 +0100 Subject: [PATCH 1/2] Fix compiler warning --- tasmota/support.ino | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tasmota/support.ino b/tasmota/support.ino index 1bc0ba4a3..54f95bc28 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1841,16 +1841,14 @@ int8_t ParseSerialConfig(const char *pstr) } #ifdef ESP8266 -SerConfu8 ConvertSerialConfigESP8286(uint8_t serial_config) { +SerConfu8 ConvertSerialConfig(uint8_t serial_config) { return (SerConfu8)pgm_read_byte(kTasmotaSerialConfig + serial_config); } -#define ConvertSerialConfig(a) ConvertSerialConfigESP8286(a) #endif // ESP8266 #ifdef ESP32 -uint32_t ConvertSerialConfigESP32(uint8_t serial_config) { +uint32_t ConvertSerialConfig(uint8_t serial_config) { return (uint32_t)pgm_read_dword(kTasmotaSerialConfig + serial_config); } -#define ConvertSerialConfig(a) ConvertSerialConfigESP32(a) #endif // ESP32 // workaround disabled 05.11.2021 solved with https://github.com/espressif/arduino-esp32/pull/5549 From b83d6e9b0402b59f47d9bacd88becc4c2e4bb7a8 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sun, 14 Nov 2021 18:23:08 +0100 Subject: [PATCH 2/2] Avoid bad ffsp pointer if no filesystem --- tasmota/xdrv_50_filesystem.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/xdrv_50_filesystem.ino b/tasmota/xdrv_50_filesystem.ino index ebd5b681c..8a0ed1d16 100644 --- a/tasmota/xdrv_50_filesystem.ino +++ b/tasmota/xdrv_50_filesystem.ino @@ -102,7 +102,7 @@ void UfsInitOnce(void) { #ifdef ESP8266 ffsp = &LittleFS; if (!LittleFS.begin()) { - ffsp = 0; + ffsp = nullptr; return; } #endif // ESP8266 @@ -114,6 +114,7 @@ void UfsInitOnce(void) { // ffat is second ffsp = &FFat; if (!FFat.begin(true)) { + ffsp = nullptr; return; } ffs_type = UFS_TFAT;