aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jisi Liu <liujisi@google.com>2017-08-15 14:58:38 -0700
committerGravatar GitHub <noreply@github.com>2017-08-15 14:58:38 -0700
commit5e39ecc569153db63bc4e1587f703c7894223375 (patch)
treeebc0271c5c663ab0f90c5a2ad6102a85b654e0e0
parente0d24cc84a81d236daf0bbf783037c8c8c24d814 (diff)
parenta23e198ccaf53fededaa09b5988afece897fc3ac (diff)
Merge pull request #3494 from drivehappy/clang_warning_macro
Fixing -Wexpansion-to-defined Clang warning
-rw-r--r--src/google/protobuf/stubs/port.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index 7879aed4..83eaf31e 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -256,8 +256,11 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
# define GOOGLE_PROTOBUF_USE_UNALIGNED 0
#else
// x86 and x86-64 can perform unaligned loads/stores directly.
-# define GOOGLE_PROTOBUF_USE_UNALIGNED defined(_M_X64) || \
- defined(__x86_64__) || defined(_M_IX86) || defined(__i386__)
+# if defined(_M_X64) || defined(__x86_64__) || defined(_M_IX86) || defined(__i386__)
+# define GOOGLE_PROTOBUF_USE_UNALIGNED 1
+# else
+# define GOOGLE_PROTOBUF_USE_UNALIGNED 0
+# endif
#endif
#if GOOGLE_PROTOBUF_USE_UNALIGNED