Closed mfechner closed 8 months ago
The fall-through in this switch
block is there on purpose -- we want control to enter the next case
and execute it.
The -Wextra
flag enables -Wimplicit-fallthrough
, which makes C/C++ emit a w warning for missing break
statements at the end of case
blocks. -Werror
additionally makes GCC treat warnings as errors -- that's why compilation fails.
The best way to fix this is by telling the compiler that falling through is intentional, using one of the methods documented here: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough_003d
Can you try if this works and submit a pull request?
I verified the linked patch and this fixes the compilation error.
I use you lib in combination with OpenDTU application running on an ESP32. The project is written using PlatformIO.
The project defined the following
build_flags
:Compilation of the project fails with:
Removing the
-Werror
flag work-around the problem.Do you see a possibility to fix this?