Build failure:
[ 2%] Building CXX object src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o
cd /tmp/buildd/casablanca-2.2.0/obj-x86_64-linux-gnu/src && /usr/bin/c++ -Dcpprest_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++11 -fno-strict-aliasing -Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-unused-function -Wno-char-subscripts -Wno-switch -Wno-unused-but-set-parameter -Wno-unused-value -Wno-unused-local-typedefs -Werror -pedantic -fPIC -I/tmp/buildd/casablanca-2.2.0/Release/include -I/tmp/buildd/casablanca-2.2.0/Release/libs/websocketpp -I/tmp/buildd/casablanca-2.2.0/Release/src/../include -I/tmp/buildd/casablanca-2.2.0/Release/src/pch -o CMakeFiles/cpprest.dir/json/json_parsing.cpp.o -c /tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp: In instantiation of 'bool web::json::details::JSON_Parser<CharType>::ParseInt64(CharType, uint64_t&) [with CharType = char; uint64_t = long unsigned int]':
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:427:44: required from 'bool web::json::details::JSON_Parser<CharType>::CompleteNumberLiteral(CharType, web::json::details::JSON_Parser<CharType>::Token&) [with CharType = char]'
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:919:47: required from 'void web::json::details::JSON_Parser<CharType>::GetNextToken(web::json::details::JSON_Parser<CharType>::Token&) [with CharType = char]'
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:1095:28: required from here
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:360:80: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (value > (ULLONG_MAX / 10) || (value == ULLONG_MAX/10 && next_digit > ULLONG_MAX%10))
^
cc1plus: all warnings being treated as errors
src/CMakeFiles/cpprest.dir/build.make:103: recipe for target 'src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o' failed
make[3]: *** [src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o] Error 1
Trivial patch:
--- casablanca-2.2.0.orig/Release/src/json/json_parsing.cpp
+++ casablanca-2.2.0/Release/src/json/json_parsing.cpp
@@ -356,7 +356,7 @@ inline bool JSON_Parser<CharType>::Parse
CharType ch = PeekCharacter();
while (ch >= '0' && ch <= '9')
{
- int next_digit = ch - '0';
+ uint64_t next_digit = ch - '0';
if (value > (ULLONG_MAX / 10) || (value == ULLONG_MAX/10 && next_digit > ULLONG_MAX%10))
return false;
[ 2%] Building CXX object src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o
cd /tmp/buildd/casablanca-2.2.0/obj-x86_64-linux-gnu/src && /usr/bin/c++ -Dcpprest_EXPORTS -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -std=c++11 -fno-strict-aliasing -Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code -Wno-deprecated -Wno-unknown-pragmas -Wno-reorder -Wno-unused-function -Wno-char-subscripts -Wno-switch -Wno-unused-but-set-parameter -Wno-unused-value -Wno-unused-local-typedefs -Werror -pedantic -fPIC -I/tmp/buildd/casablanca-2.2.0/Release/include -I/tmp/buildd/casablanca-2.2.0/Release/libs/websocketpp -I/tmp/buildd/casablanca-2.2.0/Release/src/../include -I/tmp/buildd/casablanca-2.2.0/Release/src/pch -o CMakeFiles/cpprest.dir/json/json_parsing.cpp.o -c /tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp: In instantiation of 'bool web::json::details::JSON_Parser<CharType>::ParseInt64(CharType, uint64_t&) [with CharType = char; uint64_t = long unsigned int]':
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:427:44: required from 'bool web::json::details::JSON_Parser<CharType>::CompleteNumberLiteral(CharType, web::json::details::JSON_Parser<CharType>::Token&) [with CharType = char]'
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:919:47: required from 'void web::json::details::JSON_Parser<CharType>::GetNextToken(web::json::details::JSON_Parser<CharType>::Token&) [with CharType = char]'
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:1095:28: required from here
/tmp/buildd/casablanca-2.2.0/Release/src/json/json_parsing.cpp:360:80: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (value > (ULLONG_MAX / 10) || (value == ULLONG_MAX/10 && next_digit > ULLONG_MAX%10))
^
cc1plus: all warnings being treated as errors
src/CMakeFiles/cpprest.dir/build.make:103: recipe for target 'src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o' failed
make[3]: *** [src/CMakeFiles/cpprest.dir/json/json_parsing.cpp.o] Error 1
Trivial patch:
--- casablanca-2.2.0.orig/Release/src/json/json_parsing.cpp
+++ casablanca-2.2.0/Release/src/json/json_parsing.cpp
@@ -356,7 +356,7 @@ inline bool JSON_Parser<CharType>::Parse
CharType ch = PeekCharacter();
while (ch >= '0' && ch <= '9')
{
- int next_digit = ch - '0';
+ uint64_t next_digit = ch - '0';
if (value > (ULLONG_MAX / 10) || (value == ULLONG_MAX/10 && next_digit > ULLONG_MAX%10))
return false;