Fixed warning "this statement may fall through" (issue #539)

This commit is contained in:
Benoit Blanchon
2017-07-14 11:14:50 +02:00
parent d41f7a8165
commit 2772e66064
3 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ HEAD
* Removed dependency on `PGM_P` as Particle 0.6.2 doesn't define it (issue #546) * 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 "dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]"
* Fixed warning "floating constant exceeds range of 'float' [-Woverflow]" (issue #544) * 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. * Removed `ARDUINOJSON_DOUBLE_IS_64BITS` as it became useless.
* Fixed too many decimals places in float serialization (issue #543) * Fixed too many decimals places in float serialization (issue #543)

View File

@ -26,8 +26,11 @@ inline T parseFloat(const char* s) {
switch (*s) { switch (*s) {
case '-': case '-':
negative_result = true; negative_result = true;
s++;
break;
case '+': case '+':
s++; s++;
break;
} }
if (*s == 't') return 1; // true if (*s == 't') return 1; // true

View File

@ -26,6 +26,8 @@ T parseInteger(const char *s) {
switch (*s) { switch (*s) {
case '-': case '-':
negative_result = true; negative_result = true;
s++;
break;
case '+': case '+':
s++; s++;
break; break;