diff --git a/CHANGELOG.md b/CHANGELOG.md index 1985e92d..43b8f941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ HEAD * Removed dependency on `PGM_P` as Particle 0.6.2 doesn't define it (issue #546) * Fixed warning "dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]" * Fixed warning "floating constant exceeds range of 'float' [-Woverflow]" (issue #544) +* Fixed warning "this statement may fall through" [-Wimplicit-fallthrough=] (issue #539) * Removed `ARDUINOJSON_DOUBLE_IS_64BITS` as it became useless. * Fixed too many decimals places in float serialization (issue #543) diff --git a/src/ArduinoJson/Polyfills/parseFloat.hpp b/src/ArduinoJson/Polyfills/parseFloat.hpp index d3ed2397..e5d99f1b 100644 --- a/src/ArduinoJson/Polyfills/parseFloat.hpp +++ b/src/ArduinoJson/Polyfills/parseFloat.hpp @@ -26,8 +26,11 @@ inline T parseFloat(const char* s) { switch (*s) { case '-': negative_result = true; + s++; + break; case '+': s++; + break; } if (*s == 't') return 1; // true diff --git a/src/ArduinoJson/Polyfills/parseInteger.hpp b/src/ArduinoJson/Polyfills/parseInteger.hpp index 7d353fb4..023d7bcb 100644 --- a/src/ArduinoJson/Polyfills/parseInteger.hpp +++ b/src/ArduinoJson/Polyfills/parseInteger.hpp @@ -26,6 +26,8 @@ T parseInteger(const char *s) { switch (*s) { case '-': negative_result = true; + s++; + break; case '+': s++; break;