THRIFT-3873: fix various compiler warnings and overflow errors
THRIFT-3847: change VERSION to PACKAGE_VERSION to avoid conflicts with third party or OS headers
This closes #1128
diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp
index 301a064..2da3044 100644
--- a/lib/cpp/test/JSONProtoTest.cpp
+++ b/lib/cpp/test/JSONProtoTest.cpp
@@ -262,8 +262,9 @@
":[\"i8\",3,1,2,3]},\"13\":{\"lst\":[\"i16\",3,1,2,3]},\"14\":{\"lst\":[\"i64"
"\",3,1,2,3]}}";
+ const std::size_t bufSiz = strlen(json_string) * sizeof(char);
boost::shared_ptr<TMemoryBuffer> buffer(new TMemoryBuffer(
- (uint8_t*)(json_string), strlen(json_string)*sizeof(char)));
+ (uint8_t*)(json_string), static_cast<uint32_t>(bufSiz)));
boost::shared_ptr<TJSONProtocol> proto(new TJSONProtocol(buffer));
OneOfEach ooe2;