Open kinlougha opened 1 month ago
That is not a correct fix. This is to support the ability for a statement like
int32_t offset = -60; // one hour back, may latter be changed to forward time
//blah blah
time += offset;
the abs() will need to be cast since it seems the platform you are using doesn't have a unsigned abs(signed)
version for the compiler to select.
OK I understand, i open a case to PJRC with this info and close this case.
Thanks.
Hello,
This is the answer from PJRC : https://forum.pjrc.com/index.php?threads/warning-message-at-compile.75017/
Hi Michael,
I test the solution, with the master branch, on 2 platforms (Teensy 4.1 and ESP32) and no more warning from the library.
This case is close for me.
Thanks.
Leave it open (its marked as Pending). I will close it when I publish the next update.
Sorry Michael, I leave it open, I understand.
Thanks.
Describe the bug Receive this warning when compile OnStepX under VSCode:
In file included from .pio\libdeps\teensy41\RTC\src\RtcDateTime.cpp:29: .pio\libdeps\teensy41\RTC\src\RtcDateTime.h: In member function 'RtcDateTime RtcDateTime::operator+(int32_t) const': .pio\libdeps\teensy41\RTC\src\RtcDateTime.h:168:41: warning: comparison of integer expressions of different signedness: 'int32_t' {aka 'long int'} and 'uint32_t' {aka 'long unsigned int'} [-Wsign-compare]
168 | if (seconds < 0 && abs(seconds) > totalSeconds)
**Development environment
Correction: Change "int32_t" for "uint32_t" on line 164 of RtcDateTime.h
Thanks.