We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4091281 + 13ac614 commit a40bfbcCopy full SHA for a40bfbc
RTClib.cpp
@@ -194,7 +194,7 @@ DateTime::DateTime(uint32_t t) {
194
uint8_t leap;
195
for (yOff = 0;; ++yOff) {
196
leap = yOff % 4 == 0;
197
- if (days < 365 + leap)
+ if (days < 365U + leap)
198
break;
199
days -= 365 + leap;
200
}
@@ -448,7 +448,7 @@ char *DateTime::toString(char *buffer) {
448
449
450
451
- for (int i = 0; i < strlen(buffer) - 1; i++) {
+ for (size_t i = 0; i < strlen(buffer) - 1; i++) {
452
if (buffer[i] == 'h' && buffer[i + 1] == 'h') {
453
if (!apTag) { // 24 Hour Mode
454
buffer[i] = '0' + hh / 10;
0 commit comments