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/AllProtocolTests.tcc b/lib/cpp/test/AllProtocolTests.tcc
index 8c8eaa8..3e0b833 100644
--- a/lib/cpp/test/AllProtocolTests.tcc
+++ b/lib/cpp/test/AllProtocolTests.tcc
@@ -190,14 +190,14 @@
testNaked<TProto, int64_t>(0);
for (int64_t i = 0; i < 62; i++) {
- testNaked<TProto, int64_t>(1L << i);
- testNaked<TProto, int64_t>(-(1L << i));
+ testNaked<TProto, int64_t>(1LL << i);
+ testNaked<TProto, int64_t>(-(1LL << i));
}
testField<TProto, T_I64, int64_t>(0);
for (int i = 0; i < 62; i++) {
- testField<TProto, T_I64, int64_t>(1L << i);
- testField<TProto, T_I64, int64_t>(-(1L << i));
+ testField<TProto, T_I64, int64_t>(1LL << i);
+ testField<TProto, T_I64, int64_t>(-(1LL << i));
}
testNaked<TProto, double>(123.456);