Fixed -Wparentheses warning introduced in v5.6.5 (PR #335 by @nuket)

This commit is contained in:
Max Vilimpoc (unu)
2016-08-17 20:36:50 +02:00
committed by Benoit Blanchon
parent 387b565705
commit 409ca7ee4e
3 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,11 @@
ArduinoJson: change log ArduinoJson: change log
======================= =======================
HEAD
----
* Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket)
v5.6.5 v5.6.5
------ ------

View File

@ -330,8 +330,8 @@ class JsonVariant : public JsonVariantBase<JsonVariant> {
} }
bool isString() const { bool isString() const {
return _type == Internals::JSON_STRING || return _type == Internals::JSON_STRING ||
_type == Internals::JSON_UNPARSED && _content.asString && (_type == Internals::JSON_UNPARSED && _content.asString &&
!strcmp("null", _content.asString); !strcmp("null", _content.asString));
} }
// The current type of the variant // The current type of the variant

View File

@ -25,7 +25,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
-Wformat=2 -Wformat=2
-Winit-self -Winit-self
-Wmissing-include-dirs -Wmissing-include-dirs
-Wno-parentheses -Wparentheses
-Wno-sign-conversion -Wno-sign-conversion
-Wno-unused -Wno-unused
-Wno-variadic-macros -Wno-variadic-macros