-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compiler warnings #191
Comments
I get a variation of these warnings when using PlatformIO for a NODEMCU - [env:nodemcuv2] C:\Users\me.platformio\lib\RTClib\RTClib.cpp: In member function 'char* DateTime::toString(cha The truncation was done by something in the IDE, not by myself. However, I don't get the warnings with the same source code when using for a different board (Arduino Nano) - [env:nanoatmega328new] Does the code still get compiled ok for the NODEMCU ? Would maxbla's fix work in this case ? Thanks |
Compilers differ in how they analyze the code. One compiler may see a “possible” problem where another one realizes there is no actual problem, and a third one doesn't even notice there is something to worry about. The code should compile file for either board. maxbla's fix should silence the warnings, with no measurable difference in performance. |
Hi, same warnings problem on PlatformIO
|
Should be fixed with latest library release. |
if you check the box "show verbose output during compilation" in the Arduino IDE, verifying any library that includes RTClib will print warnings.
It would be better if compiling didn't print warnings, but as far as I can tell, the uninitalized values aren't being read. The warnings are just being overly careful.
Easy fix: change
to
I can submit a PR making this change, but I'd prefer to wait until my first PR, #190 goes through.
The text was updated successfully, but these errors were encountered: