Skip to content

Commit 40d1cfe

Browse files
committed
Fixed "pointless integer comparison" warning on IAR (issue bblanchon#1233)
1 parent 4627f85 commit 40d1cfe

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ HEAD
66

77
* Fixed "maybe-uninitialized" warning (issue #1217)
88
* Fixed "statement is unreachable" warning on IAR (issue #1233)
9+
* Fixed "pointless integer comparison" warning on IAR (issue #1233)
910

1011
v6.15.0 (2020-03-22)
1112
-------

src/ArduinoJson/MsgPack/MsgPackSerializer.hpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ class MsgPackSerializer {
125125
} else if (value <= 0xFFFF) {
126126
writeByte(0xCD);
127127
writeInteger(uint16_t(value));
128-
} else if (value <= 0xFFFFFFFF) {
128+
}
129+
#if ARDUINOJSON_USE_LONG_LONG
130+
else if (value <= 0xFFFFFFFF)
131+
#else
132+
else
133+
#endif
134+
{
129135
writeByte(0xCE);
130136
writeInteger(uint32_t(value));
131137
}

0 commit comments

Comments
 (0)