Closed johnboiles closed 2 years ago
Thanks @johnboiles,
I think abort()
might be better here as this is a fatal error (should never return and should be clear that it never returns)?
assert(0)
is definitely incorrect as its behaviour depends on the build configuration, thanks for pointing that out.
Just confirmed that also compiles fine. Works for me!
GCC isn't smart enough that if we get to the assert the return value doesn't matter anyways and raises a
control reaches end of non-void function
warning. This is especially a bummer when treating warnings as errors (which I think is the ESP-IDF 4.4 default)