You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by do...@apache.org on 2020/08/06 23:21:13 UTC

[orc] branch branch-1.6 updated: ORC-654: Fix build with clang-10 and ubuntu-20

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-1.6
in repository https://gitbox.apache.org/repos/asf/orc.git


The following commit(s) were added to refs/heads/branch-1.6 by this push:
     new 1b061dd  ORC-654: Fix build with clang-10 and ubuntu-20
1b061dd is described below

commit 1b061dddd73549c5c1063ac6324a9ca0ae13c82b
Author: Nikita Mikhaylov <mi...@gmail.com>
AuthorDate: Wed Aug 5 21:06:52 2020 +0300

    ORC-654: Fix build with clang-10 and ubuntu-20
    
    ### What changes were proposed in this pull request?
    
    On Ubuntu 20 with Clang 10, build doesn't work https://gist.github.com/nikitamikhaylov/18e5f22e81a89f701520558a4c39f30d
    Because every statement is separated by ; and ; after { means empty statement, which has no effect.
    
    ### Why are the changes needed?
    
    Because I want the build to work on Ubuntu 20.
    
    ### How was this patch tested?
    
    Build now works.
    
    Co-authored-by: Nikita Mikhailov <ja...@jakalletti-build.sas.yp-c.yandex.net>
    (cherry picked from commit 562ec43f4206b80b6436774a1cb2fdb3d66d584b)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 c++/src/RleEncoderV2.cc     | 4 ++--
 c++/test/TestBloomFilter.cc | 6 +++---
 c++/test/TestByteRle.cc     | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/c++/src/RleEncoderV2.cc b/c++/src/RleEncoderV2.cc
index a8e54e0..44e2761 100644
--- a/c++/src/RleEncoderV2.cc
+++ b/c++/src/RleEncoderV2.cc
@@ -123,7 +123,7 @@ void RleEncoderV2::write(int64_t val) {
             numLiterals = MIN_REPEAT;
         }
 
-        if (fixedRunLength == MAX_LITERAL_SIZE) {;
+        if (fixedRunLength == MAX_LITERAL_SIZE) {
             determineEncoding(option);
             writeValues(option);
         }
@@ -696,7 +696,7 @@ void RleEncoderV2::writeInts(int64_t* input, uint32_t offset, size_t len, uint32
   if (getClosestAlignedFixedBits(bitSize) == bitSize) {
     uint32_t numBytes;
     uint32_t endOffSet = static_cast<uint32_t>(offset + len);
-    if (bitSize < 8 ) {;
+    if (bitSize < 8 ) {
       char bitMask = static_cast<char>((1 << bitSize) - 1);
       uint32_t numHops = 8 / bitSize;
       uint32_t remainder = static_cast<uint32_t>(len % numHops);
diff --git a/c++/test/TestBloomFilter.cc b/c++/test/TestBloomFilter.cc
index 1d82d95..71c9b7b 100644
--- a/c++/test/TestBloomFilter.cc
+++ b/c++/test/TestBloomFilter.cc
@@ -152,9 +152,9 @@ namespace orc {
 
     // test strings
     bloomFilter.reset();
-    const char * emptyStr = u8"";
-    const char * enStr = u8"english";
-    const char * cnStr = u8"中国字";
+    const char * emptyStr = "";
+    const char * enStr = "english";
+    const char * cnStr = "中国字";
 
     EXPECT_FALSE(bloomFilter.testBytes(emptyStr,
                                        static_cast<int64_t>(strlen(emptyStr))));
diff --git a/c++/test/TestByteRle.cc b/c++/test/TestByteRle.cc
index 65d1551..c3fa8b2 100644
--- a/c++/test/TestByteRle.cc
+++ b/c++/test/TestByteRle.cc
@@ -1107,7 +1107,7 @@ TEST(BooleanRle, skipTestWithNulls) {
       rle->skip(4);
     }
     rle->skip(0);
-    data.assign(data.size(), -1);;
+    data.assign(data.size(), -1);
     rle->next(data.data(), data.size(), allNull.data());
     for (size_t j = 0; j < data.size(); ++j) {
       EXPECT_EQ(0, data[j]) << "Output wrong at " << i << ", " << j;