aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-08-15 14:58:38 -0700
committerdrivehappy <drivehappy@gmail.com>2017-08-21 16:29:27 -0700
commitc27b56c6927642157f0c392faca6c9fcba9750d0 (patch)
treeeb224bbaa5f5935c701af12b6f93d397c23086cd /src
parent92d768c11380a57bc54e9a11c8f53d51bd92c6f6 (diff)
downloadprotobuf-c27b56c6927642157f0c392faca6c9fcba9750d0.tar.gz
protobuf-c27b56c6927642157f0c392faca6c9fcba9750d0.tar.bz2
protobuf-c27b56c6927642157f0c392faca6c9fcba9750d0.zip
Merge pull request #3494 from drivehappy/clang_warning_macro
Fixing -Wexpansion-to-defined Clang warning
Diffstat (limited to 'src')
-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 dbc29861..0f304c6b 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