Closed bertrik closed 3 years ago
With GCC 8.3, these are more serious problem and cause strange errors. A missing return in a function returning non-void is undefined behaviour in C++, and GCC 8.3 for Cortex-M0 generates code where these functions don't return and the execution just flows to the next address in program memory causing very strange and hard to debug errors.
Nice catch. However, I think the correct solution is to change the function signatures return to void.
Related issue # and issue behavior
This fixes the compile warnings I get when using this library in my project. The warnings are about two functions declared in the header file as returning a bool, but the actual implementation does not actually return a bool, returning a void instead.
Description of changes/fixes
This patch adds the return statements (true) to the two functions that are missing them.