Fixed "pointless integer comparison" warning on IAR (issue #1233)

This commit is contained in:
Benoit Blanchon
2020-04-06 18:20:12 +02:00
parent 4627f851ca
commit 40d1cfe7af
2 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,7 @@ HEAD
* Fixed "maybe-uninitialized" warning (issue #1217) * Fixed "maybe-uninitialized" warning (issue #1217)
* Fixed "statement is unreachable" warning on IAR (issue #1233) * Fixed "statement is unreachable" warning on IAR (issue #1233)
* Fixed "pointless integer comparison" warning on IAR (issue #1233)
v6.15.0 (2020-03-22) v6.15.0 (2020-03-22)
------- -------

View File

@ -125,7 +125,13 @@ class MsgPackSerializer {
} else if (value <= 0xFFFF) { } else if (value <= 0xFFFF) {
writeByte(0xCD); writeByte(0xCD);
writeInteger(uint16_t(value)); writeInteger(uint16_t(value));
} else if (value <= 0xFFFFFFFF) { }
#if ARDUINOJSON_USE_LONG_LONG
else if (value <= 0xFFFFFFFF)
#else
else
#endif
{
writeByte(0xCE); writeByte(0xCE);
writeInteger(uint32_t(value)); writeInteger(uint32_t(value));
} }