Open
Description
I am using Arduino IDE 2.2.1 and when compiling the example sketch I get the following error:
/Users/pe1rmg/Documents/Arduino/libraries/LTC2942/src/LTC2942.cpp: In member function 'uint8_t LTC2942::findExponentOfPowerOfTwo(uint8_t)':
/Users/pe1rmg/Documents/Arduino/libraries/LTC2942/src/LTC2942.cpp:195:1: error: control reaches end of non-void function [-Werror=return-type]
195 | }
| ^
cc1plus: some warnings being treated as errors
exit status 1
Compilation error: exit status 1
I have solved this by adding "return 0;" at line 195, so there is a default return value, even when it will never reach the default return.
Maybe you can add this in your library to make it compatible with the current Arduino IDE compiler settings?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels