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 2015/10/24 00:55:55 UTC

orc git commit: ORC-32. Fix warnings under MacOS. (omalley)

Repository: orc
Updated Branches:
  refs/heads/master eecd70141 -> d81c9a61f


ORC-32. Fix warnings under MacOS. (omalley)

closes apache/orc#11


Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/d81c9a61
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/d81c9a61
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/d81c9a61

Branch: refs/heads/master
Commit: d81c9a61f64cc63655b4e29dd4c8d11db4d6bc12
Parents: eecd701
Author: Owen O'Malley <om...@apache.org>
Authored: Thu Oct 22 09:46:14 2015 -0700
Committer: Owen O'Malley <om...@apache.org>
Committed: Fri Oct 23 15:54:07 2015 -0700

----------------------------------------------------------------------
 c++/src/Reader.cc                   | 9 +++++----
 c++/src/wrap/coded-stream-wrapper.h | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/orc/blob/d81c9a61/c++/src/Reader.cc
----------------------------------------------------------------------
diff --git a/c++/src/Reader.cc b/c++/src/Reader.cc
index c22996b..7080829 100644
--- a/c++/src/Reader.cc
+++ b/c++/src/Reader.cc
@@ -1070,8 +1070,9 @@ namespace orc {
         columnId != included.end(); ++columnId) {
       if (*columnId == 0) {
         selectType(*(schema.get()));
-      } else if (*columnId <= static_cast<int64_t>(schema->getSubtypeCount())) {
-        selectType(schema->getSubtype(*columnId-1));
+      } else if (*columnId <=
+                 static_cast<int64_t>(schema->getSubtypeCount())) {
+        selectType(schema->getSubtype(static_cast<uint64_t>(*columnId-1)));
       }
     }
     if (included.size() > 0) {
@@ -1080,8 +1081,8 @@ namespace orc {
   }
 
   void ReaderImpl::selectType(const Type& type) {
-    if (!selectedColumns[type.getColumnId()]) {
-      selectedColumns[type.getColumnId()] = true;
+    if (!selectedColumns[static_cast<size_t>(type.getColumnId())]) {
+      selectedColumns[static_cast<size_t>(type.getColumnId())] = true;
       for (uint64_t i=0; i < type.getSubtypeCount(); i++) {
         selectType(type.getSubtype(i));
       }

http://git-wip-us.apache.org/repos/asf/orc/blob/d81c9a61/c++/src/wrap/coded-stream-wrapper.h
----------------------------------------------------------------------
diff --git a/c++/src/wrap/coded-stream-wrapper.h b/c++/src/wrap/coded-stream-wrapper.h
index 1155dd7..07af410 100644
--- a/c++/src/wrap/coded-stream-wrapper.h
+++ b/c++/src/wrap/coded-stream-wrapper.h
@@ -21,6 +21,7 @@ DIAGNOSTIC_PUSH
 
 #ifdef __clang__
   DIAGNOSTIC_IGNORE("-Wshorten-64-to-32")
+  DIAGNOSTIC_IGNORE("-Wreserved-id-macro")
 #endif
 
 DIAGNOSTIC_IGNORE("-Wconversion")