This repository has been archived by the owner on Feb 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Missing default case in switch causes #10
Comments
HI @jenschr Thanks for the bug report, which is caused by recently aggressive behaviour of the compiler settings. While I'll fix the issue very soon, you can test normally by temporarily setting, if using Arduino IDE, |
Yeah. I hacked around it, but wanted to be sure you knew about this issue. I'm looking through many MQTT libs for my students tonight and there sure is a lot of them that does not compile right now :) |
khoih-prog
added a commit
that referenced
this issue
Sep 14, 2022
### Releases v1.7.0 1. Fix ESP32 compile error. Check [Missing default case in switch causes #10](#10) 2. Change to new [Forked ESPAsyncTCP library](https://github.com/khoih-prog/ESPAsyncTCP) for ESP8266 boards, using WiFi or LwIP Ethernet, with [ESP8266 core v3.0.2+](https://github.com/esp8266/Arduino/releases/tag/3.0.2) or WiFi with [ESP8266 core v2.7.4](https://github.com/esp8266/Arduino/releases/tag/2.7.4) to avoid compile errors
khoih-prog
added a commit
that referenced
this issue
Sep 14, 2022
### Releases v1.7.0 1. Fix ESP32 compile error. Check [Missing default case in switch causes #10](#10) 2. Change to new [Forked ESPAsyncTCP library](https://github.com/khoih-prog/ESPAsyncTCP) for ESP8266 boards, using WiFi or LwIP Ethernet, with [ESP8266 core v3.0.2+](https://github.com/esp8266/Arduino/releases/tag/3.0.2) or WiFi with [ESP8266 core v2.7.4](https://github.com/esp8266/Arduino/releases/tag/2.7.4) to avoid compile errors
khoih-prog
added a commit
that referenced
this issue
Sep 14, 2022
### Releases v1.7.0 1. Fix ESP32 compile error. Check [Missing default case in switch causes #10](#10) 2. Change to new [Forked ESPAsyncTCP library](https://github.com/khoih-prog/ESPAsyncTCP) for ESP8266 boards, using WiFi or LwIP Ethernet, with [ESP8266 core v3.0.2+](https://github.com/esp8266/Arduino/releases/tag/3.0.2) or WiFi with [ESP8266 core v2.7.4](https://github.com/esp8266/Arduino/releases/tag/2.7.4) to avoid compile errors
Hi @jenschr The new AsyncMQTT_Generic releases v1.7.0 has just been published. Your contribution is noted in Contributions and Thanks Best Regards, Releases v1.7.0
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
In the example file "FullyFeatured_ESP32.ino", the Switch case does not have a "default" to catch anything not handled.
Steps to Reproduce
Compile example "FullyFeatured_ESP32.ino" in Arduino IDE with board set to "Adafruit Feather ESP32-S2".
Expected behavior
Expected the file to compile without errors
Actual behavior
Error compiling....
Solution
Just add a default case for the WiFiEvent(WiFiEvent_t event) method outside the "if" so that both versions has a default so you don't hqve to handle all possible cases:
default: break;
Information
Arduino IDE version: 1.8.19
ESP32 Core Version 2.0.4
OS: OSX 11.6
Context:
Trying to make the basic example compile
Additional context
Relevant error message:
The text was updated successfully, but these errors were encountered: