Ticket #9893: 0002-property_tree-fix-Clang-Wtautological-constant-out-o.patch

File 0002-property_tree-fix-Clang-Wtautological-constant-out-o.patch, 1.4 KB (added by mstahl@…, 9 years ago)
  • include/boost/property_tree/detail/json_parser_write.hpp

    From 5fdd564d503d997ba0fe3f49c4a1d510468a0864 Mon Sep 17 00:00:00 2001
    From: Tor Lillqvist <tml@iki.fi>
    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 <mstahl@redhat.com>
    ---
     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 b namespace boost { namespace property_tree { namespace json_parser  
    3333            // We escape everything outside ASCII, because this code can't
    3434            // handle high unicode characters.
    3535            if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
    36                 (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
     36                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && static_cast<typename std::basic_string<Ch>::traits_type::int_type>(*b) <= 0xFF))
    3737                result += *b;
    3838            else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
    3939            else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');