From cf86c473a519da54c3b84b85bdc924b6a9db35ff Mon Sep 17 00:00:00 2001 From: Gaurav Date: Tue, 15 Mar 2016 18:31:44 +0530 Subject: [PATCH 1/2] Supporting GCC 6.0 This patch is also needed to build success for GCC 6.0. Refer issue - https://github.com/open-source-parsers/jsoncpp/issues/411 --- src/lib_json/json_value.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 31a489a89..d79036351 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -62,7 +62,7 @@ static inline bool InRange(double d, T min, U max) { } #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) static inline double integerToDouble(Json::UInt64 value) { - return static_cast(Int64(value / 2)) * 2.0 + Int64(value & 1); + return static_cast(Int64(value / 2)) * 2.0 + static_cast(Int64(value & 1)); } template static inline double integerToDouble(T value) { From fbe1cf3916a8ecdf664d03d2dbdc3d96a1588ab9 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Tue, 15 Mar 2016 18:33:34 +0530 Subject: [PATCH 2/2] Supporting GCC 6.0 Fixes test with GCC-6.0 --- src/test_lib_json/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index fbe771a92..1a1216e32 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -39,7 +39,7 @@ static inline double uint64ToDouble(Json::UInt64 value) { #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) static inline double uint64ToDouble(Json::UInt64 value) { return static_cast(Json::Int64(value / 2)) * 2.0 + - Json::Int64(value & 1); + static_cast(Json::Int64(value & 1)); } #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)