From be6ca2e1d282d710f88d1d60eec88c20004bbc30 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 11 Oct 2016 21:44:25 +1100 Subject: [PATCH] build: workaround unknown warning warning in clang --- json/tree.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/json/tree.cpp b/json/tree.cpp index d1f316c1..0be6686b 100644 --- a/json/tree.cpp +++ b/json/tree.cpp @@ -387,8 +387,11 @@ json::tree::node::as_chars (void) const& /////////////////////////////////////////////////////////////////////////////// namespace json { namespace tree { +#if defined(__clang__) +#elif defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wuseless-cast" +#endif template <> bool node::as (void) const { @@ -447,7 +450,10 @@ namespace json { namespace tree { { return static_cast (as_sint ()); } +#if defined(__clang__) +#elif defined(__GNUC__) #pragma GCC diagnostic pop +#endif } }