From 409ca7ee4e3658a1c1cb60e9188d553cda74a74a Mon Sep 17 00:00:00 2001 From: "Max Vilimpoc (unu)" Date: Wed, 17 Aug 2016 20:36:50 +0200 Subject: [PATCH] Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket) --- CHANGELOG.md | 5 +++++ include/ArduinoJson/JsonVariant.hpp | 4 ++-- test/CMakeLists.txt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ca214f1..e4b15ba0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ArduinoJson: change log ======================= +HEAD +---- + +* Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket) + v5.6.5 ------ diff --git a/include/ArduinoJson/JsonVariant.hpp b/include/ArduinoJson/JsonVariant.hpp index df573b23..f0953cf5 100644 --- a/include/ArduinoJson/JsonVariant.hpp +++ b/include/ArduinoJson/JsonVariant.hpp @@ -330,8 +330,8 @@ class JsonVariant : public JsonVariantBase { } bool isString() const { return _type == Internals::JSON_STRING || - _type == Internals::JSON_UNPARSED && _content.asString && - !strcmp("null", _content.asString); + (_type == Internals::JSON_UNPARSED && _content.asString && + !strcmp("null", _content.asString)); } // The current type of the variant diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ea8074a8..66917a9d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -25,7 +25,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") -Wformat=2 -Winit-self -Wmissing-include-dirs - -Wno-parentheses + -Wparentheses -Wno-sign-conversion -Wno-unused -Wno-variadic-macros