You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
jdavid
added a commit
to jdavid/LTC2942-Arduino-Library
that referenced
this issue
Mar 7, 2024
FixesMacroYau#9
[...]/LTC2942.cpp: In member function 'uint8_t LTC2942::findExponentOfPowerOfTwo(uint8_t)':
[...]/LTC2942.cpp:195:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors
I am using Arduino IDE 2.2.1 and when compiling the example sketch I get the following error:
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!
The text was updated successfully, but these errors were encountered: