Specify signed char

x86 architecture default to signed characters.  Other architectures
default to unsigned characters.  When building on non-x86 arch we
get the following error

./json.hpp:22700:42:   required from here
./json.hpp:8494:24: error: comparison is always true due to limited
                           range of data type [-Werror=type-limits]
 8494 |             if ('\x00' <= c and c <= '\x1F')
      |                 ~~~~~~~^~~~

Signed-off-by: Tony Asleson <tasleson@redhat.com>
This commit is contained in:
Tony Asleson 2020-02-12 13:27:06 -06:00
parent 973c52dd4a
commit 3c3c11a6cb
2 changed files with 2 additions and 2 deletions

View File

@ -1492,7 +1492,7 @@ scan_number_done:
position_t position {};
/// raw input token string (for error messages)
std::vector<char> token_string {};
std::vector<signed char> token_string {};
/// buffer for variable-length tokens (numbers, strings)
string_t token_buffer {};

View File

@ -8622,7 +8622,7 @@ scan_number_done:
position_t position {};
/// raw input token string (for error messages)
std::vector<char> token_string {};
std::vector<signed char> token_string {};
/// buffer for variable-length tokens (numbers, strings)
string_t token_buffer {};