-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
warning: comparison of integer expressions of different signedness #209
Comments
That is not a correct fix. This is to support the ability for a statement like
the abs() will need to be cast since it seems the platform you are using doesn't have a |
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.
The text was updated successfully, but these errors were encountered: