You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2019/05/29 22:56:37 UTC
[orc] branch master updated: ORC-506: Fix C++ compiler warnings.
This is an automated email from the ASF dual-hosted git repository.
omalley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/master by this push:
new bfd63b8 ORC-506: Fix C++ compiler warnings.
bfd63b8 is described below
commit bfd63b8e4df35472d8d9d89c328c5b74b7af6e1a
Author: Renat Valiullin <re...@microsoft.com>
AuthorDate: Thu May 23 13:19:01 2019 -0700
ORC-506: Fix C++ compiler warnings.
Fixes #394
Signed-off-by: Owen O'Malley <om...@apache.org>
---
c++/include/orc/Common.hh | 2 +-
c++/src/Murmur3.hh | 4 ++--
c++/test/TestWriter.cc | 11 +++++------
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/c++/include/orc/Common.hh b/c++/include/orc/Common.hh
index c4523af..97eac9e 100644
--- a/c++/include/orc/Common.hh
+++ b/c++/include/orc/Common.hh
@@ -270,7 +270,7 @@ namespace orc {
// Only include the BLOOM_FILTER_UTF8 streams that consistently use UTF8.
// See ORC-101
UTF8 = 1,
- FUTURE = INT64_MAX
+ FUTURE = INT32_MAX
};
}
diff --git a/c++/src/Murmur3.hh b/c++/src/Murmur3.hh
index 0e7b1a2..0239181 100644
--- a/c++/src/Murmur3.hh
+++ b/c++/src/Murmur3.hh
@@ -25,8 +25,8 @@ namespace orc {
class Murmur3 {
public:
- enum { DEFAULT_SEED = 104729 };
- enum { NULL_HASHCODE = 2862933555777941757LL };
+ static const uint32_t DEFAULT_SEED = 104729;
+ static const uint64_t NULL_HASHCODE = 2862933555777941757LL;
static uint64_t hash64(const uint8_t *data, uint32_t len);
diff --git a/c++/test/TestWriter.cc b/c++/test/TestWriter.cc
index 930becc..b7f8ff7 100644
--- a/c++/test/TestWriter.cc
+++ b/c++/test/TestWriter.cc
@@ -1213,8 +1213,8 @@ namespace orc {
// in total 3 rows, each has 1, 2, and 3 'à' respectively
std::vector<char> vec;
for (uint64_t i = 0; i != rowCount; ++i) {
- vec.push_back(static_cast<char>(0xC3));
- vec.push_back(static_cast<char>(0xA0));
+ vec.push_back('\xC3');
+ vec.push_back('\xA0');
strs.push_back(vec);
charBatch->data[i] = varcharBatch->data[i] = strs.back().data();
charBatch->length[i] = varcharBatch->length[i] = static_cast<int64_t>(strs.back().size());
@@ -1242,10 +1242,9 @@ namespace orc {
EXPECT_EQ(true, rowReader->next(*batch));
EXPECT_EQ(rowCount, batch->numElements);
- char expectedPadded[3] = {static_cast<char>(0xC3), static_cast<char>(0xA0), ' '};
- char expectedOneChar[2] = {static_cast<char>(0xC3), static_cast<char>(0xA0)};
- char expectedTwoChars[4] = {static_cast<char>(0xC3), static_cast<char>(0xA0),
- static_cast<char>(0xC3), static_cast<char>(0xA0)};
+ char expectedPadded[3] = {'\xC3', '\xA0', ' '};
+ char expectedOneChar[2] = {'\xC3', '\xA0'};
+ char expectedTwoChars[4] = {'\xC3', '\xA0', '\xC3', '\xA0'};
EXPECT_EQ(3, charBatch->length[0]);
EXPECT_EQ(4, charBatch->length[1]);