arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-1150: Silence AdaptiveIntBuilder compiler warning on MSVC
Date Thu, 13 Jul 2017 12:43:07 GMT
Repository: arrow
Updated Branches:
  refs/heads/master 28e06d870 -> 74bc8735b


ARROW-1150: Silence AdaptiveIntBuilder compiler warning on MSVC

We need to explicitly mark those sections as safe.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #834 from xhochy/ARROW-1150 and squashes the following commits:

a03df6c [Uwe L. Korn] ARROW-1150: Silence AdaptiveIntBuilder compiler warning on MSVC


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

Branch: refs/heads/master
Commit: 74bc8735b258f9437fd0e239d892da857c83b780
Parents: 28e06d8
Author: Uwe L. Korn <uwelk@xhochy.com>
Authored: Thu Jul 13 08:43:01 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Thu Jul 13 08:43:01 2017 -0400

----------------------------------------------------------------------
 cpp/src/arrow/builder.cc | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/74bc8735/cpp/src/arrow/builder.cc
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/builder.cc b/cpp/src/arrow/builder.cc
index c3bc745..155d81a 100644
--- a/cpp/src/arrow/builder.cc
+++ b/cpp/src/arrow/builder.cc
@@ -341,6 +341,10 @@ Status AdaptiveIntBuilder::Append(
     std::memcpy(reinterpret_cast<int64_t*>(raw_data_) + length_, values,
         sizeof(int64_t) * length);
   } else {
+#ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable:4996)
+#endif
     // int_size_ may have changed, so we need to recheck
     switch (int_size_) {
       case 1: {
@@ -361,6 +365,9 @@ Status AdaptiveIntBuilder::Append(
       default:
         DCHECK(false);
     }
+#ifdef _MSC_VER
+#  pragma warning(pop)
+#endif
   }
 
   // length_ is update by these
@@ -489,6 +496,10 @@ Status AdaptiveUIntBuilder::Append(
     std::memcpy(reinterpret_cast<uint64_t*>(raw_data_) + length_, values,
         sizeof(uint64_t) * length);
   } else {
+#ifdef _MSC_VER
+#  pragma warning(push)
+#  pragma warning(disable:4996)
+#endif
     // int_size_ may have changed, so we need to recheck
     switch (int_size_) {
       case 1: {
@@ -509,6 +520,9 @@ Status AdaptiveUIntBuilder::Append(
       default:
         DCHECK(false);
     }
+#ifdef _MSC_VER
+#  pragma warning(pop)
+#endif
   }
 
   // length_ is update by these


Mime
View raw message