Hi,

jsoncpp-0.10.0 fails to compile on i386 with following error:

src/test_lib_json/main.cpp:1243: error: integer constant is too large for 
'long' type

applying below patch fixes the issue:

--- src/test_lib_json/main.cpp.orig     Sun Mar 15 19:25:04 2015
+++ src/test_lib_json/main.cpp  Sun Mar 29 00:03:38 2015
@@ -1240,7 +1240,7 @@ JSONTEST_FIXTURE(ValueTest, nonIntegers) {
 
   // A 16-digit floating point number.
   val = Json::Value(2199023255552000.0f);
-  JSONTEST_ASSERT_EQUAL(float(2199023255552000), val.asFloat());
+  JSONTEST_ASSERT_EQUAL(float(2199023255552000LL), val.asFloat());
   JSONTEST_ASSERT_STRING_EQUAL("2199023255552000",
                                normalizeFloatingPointStr(val.asString()));
 

-- 
best regards
q#

Reply via email to