parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-551:Handle compiler warnings due to disabled DCHECKs in relea…
Date Wed, 06 Jul 2016 22:08:20 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master 7b92d7a20 -> ec78dd86e


PARQUET-551:Handle compiler warnings due to disabled DCHECKs in relea…

…se builds

Author: Deepak Majeti <deepak.majeti@hpe.com>

Closes #132 from majetideepak/PARQUET-551 and squashes the following commits:

3b1212a [Deepak Majeti] addressed comments
6fdd3c4 [Deepak Majeti] PARQUET-551:Handle compiler warnings due to disabled DCHECKs in release
builds


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

Branch: refs/heads/master
Commit: ec78dd86e866c13f3e537339a9173b2987f67c1e
Parents: 7b92d7a
Author: Deepak Majeti <deepak.majeti@hpe.com>
Authored: Wed Jul 6 15:08:14 2016 -0700
Committer: Wes McKinney <wesm@apache.org>
Committed: Wed Jul 6 15:08:14 2016 -0700

----------------------------------------------------------------------
 CMakeLists.txt             | 2 +-
 src/parquet/util/logging.h | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/ec78dd86/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f2c08cb..7d7fa44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -331,7 +331,7 @@ endif ()
 
 message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -fno-strict-aliasing")
 
 if (PARQUET_USE_SSE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/ec78dd86/src/parquet/util/logging.h
----------------------------------------------------------------------
diff --git a/src/parquet/util/logging.h b/src/parquet/util/logging.h
index 8d3e88a..3c873e3 100644
--- a/src/parquet/util/logging.h
+++ b/src/parquet/util/logging.h
@@ -36,6 +36,7 @@ namespace parquet {
 
 #define PARQUET_LOG_INTERNAL(level) parquet::internal::CerrLog(level)
 #define PARQUET_LOG(level) PARQUET_LOG_INTERNAL(PARQUET_##level)
+#define PARQUET_IGNORE_EXPR(expr) ((void)(expr));
 
 #define PARQUET_CHECK(condition) \
   (condition) ? 0 : PARQUET_LOG(FATAL) << "Check failed: " #condition " "
@@ -44,24 +45,31 @@ namespace parquet {
 #define PARQUET_DFATAL PARQUET_WARNING
 
 #define DCHECK(condition) \
+  PARQUET_IGNORE_EXPR(condition)\
   while (false)           \
   parquet::internal::NullLog()
 #define DCHECK_EQ(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 #define DCHECK_NE(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 #define DCHECK_LE(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 #define DCHECK_LT(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 #define DCHECK_GE(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 #define DCHECK_GT(val1, val2) \
+  PARQUET_IGNORE_EXPR(val1)   \
   while (false)               \
   parquet::internal::NullLog()
 


Mime
View raw message