V4 target: enable warning for variable shadoing

* pio.ini: add "-Wshadow=compatible-local" for V4 targets
* pio.ini: fix alignment for 8266 build_flags
* fix one (harmless) case of shadowed vars in MM specific code
This commit is contained in:
Frank
2023-04-14 14:20:55 +02:00
parent db62153e34
commit 5f4dd53be4
2 changed files with 13 additions and 12 deletions

View File

@@ -226,17 +226,17 @@ build_flags =
-DESP8266 -DESP8266
-DFP_IN_IROM -DFP_IN_IROM
;-Wno-deprecated-declarations ;-Wno-deprecated-declarations
;-Wno-register ;-Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C
;-Wno-misleading-indentation ;-Wno-misleading-indentation
; NONOSDK22x_190703 = 2.2.2-dev(38a443e) ; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703 -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; lwIP 2 - Higher Bandwidth no Features ; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH ; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 1.4 - Higher Bandwidth (Aircoookie has) ; lwIP 1.4 - Higher Bandwidth (Aircoookie has)
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; VTABLES in Flash ; VTABLES in Flash
-DVTABLES_IN_FLASH -DVTABLES_IN_FLASH
; restrict to minimal mime-types ; restrict to minimal mime-types
-DMIMETYPE_MINIMAL -DMIMETYPE_MINIMAL
lib_deps = lib_deps =
@@ -915,6 +915,7 @@ platform_packages = ${esp32.platformV4_packages}
build_unflags = ${common.build_unflags} build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags} ${esp32.build_flagsV4} ${common_mm.build_flags_S} build_flags = ${common.build_flags} ${esp32.build_flagsV4} ${common_mm.build_flags_S}
-Wno-misleading-indentation -Wno-format-truncation -Wno-misleading-indentation -Wno-format-truncation
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one
-D WLED_ENABLE_DMX_INPUT -D WLED_ENABLE_DMX_INPUT
lib_deps = ${esp32.lib_depsV4} ${common_mm.lib_deps_S} lib_deps = ${esp32.lib_depsV4} ${common_mm.lib_deps_S}
board_build.partitions = ${esp32.default_partitions} board_build.partitions = ${esp32.default_partitions}

View File

@@ -958,10 +958,10 @@ void WLED::initInterfaces()
#endif #endif
#endif #endif
} else { } else {
IPAddress ipAddress = Network.localIP(); IPAddress ndIpAddress = Network.localIP();
netDebugPrintIP[0] = ipAddress[0]; netDebugPrintIP[0] = ndIpAddress[0];
netDebugPrintIP[1] = ipAddress[1]; netDebugPrintIP[1] = ndIpAddress[1];
netDebugPrintIP[2] = ipAddress[2]; netDebugPrintIP[2] = ndIpAddress[2];
} }
} }
if (netDebugPrintPort == 0) if (netDebugPrintPort == 0)