arch/xtensa: Scope Wi-Fi disconnect case declarations.#18770
arch/xtensa: Scope Wi-Fi disconnect case declarations.#18770xiaoxiang781216 merged 1 commit intoapache:masterfrom
Conversation
- fix a "a label can only be part of a statement and a declaration is not a statement" compile error. - toolchain xtensa-esp32s3-elf-gcc (crosstool-NG esp-2021r2) 8.4.0 Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
|
@fdcavalcanti Hi, have you ever hitted this error before? Thanks |
|
Hi, Seems you toolchain version is older than our suggested version. Please check dockerfile for proper toolchain version. We are testing wifi config and we did not face any build error. |
Indeed, our versions differ significantly. Version 14.2 in the Dockerfile is quite new. Seems this specific syntax is supported as a new feature in c23 Ok, seems this modification is not necessary, right? |
Yes, we don't need that with new toolchain usage |
|
but it's always good to scope the variables in the right block. |
xtensa-esp32s3-elf-gcc (crosstool-NG esp-2021r2) 8.4.0Summary
I encountered the following compilation error while building ESP32 Wi-Fi related code
My toolchain is
Wrap WIFI_EVENT_STA_DISCONNECTED case declarations in braces to make the switch case
compile correctly with standard C rules.
Impact
bugfix
Testing
Config :
CONFIG_BASE_DEFCONFIG="esp32s3-devkit:nsh-dirty"+Logs after patch: