From 5fdd564d503d997ba0fe3f49c4a1d510468a0864 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 14 Apr 2014 12:19:21 +0200 Subject: [PATCH 2/2] property_tree: fix Clang -Wtautological-constant-out-of-range-compare Signed-off-by: Michael Stahl --- include/boost/property_tree/detail/json_parser_write.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/property_tree/detail/json_parser_write.hpp b/include/boost/property_tree/detail/json_parser_write.hpp index b52c8ea..93e498e 100644 --- a/include/boost/property_tree/detail/json_parser_write.hpp +++ b/include/boost/property_tree/detail/json_parser_write.hpp @@ -33,7 +33,7 @@ namespace boost { namespace property_tree { namespace json_parser // We escape everything outside ASCII, because this code can't // handle high unicode characters. if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) || - (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF)) + (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && static_cast::traits_type::int_type>(*b) <= 0xFF)) result += *b; else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b'); else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f'); -- 1.8.3.1