diff options
author | Jisi Liu <liujisi@google.com> | 2017-08-15 14:58:38 -0700 |
---|---|---|
committer | drivehappy <drivehappy@gmail.com> | 2017-08-21 16:29:27 -0700 |
commit | c27b56c6927642157f0c392faca6c9fcba9750d0 (patch) | |
tree | eb224bbaa5f5935c701af12b6f93d397c23086cd | |
parent | 92d768c11380a57bc54e9a11c8f53d51bd92c6f6 (diff) | |
download | protobuf-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
-rw-r--r-- | src/google/protobuf/stubs/port.h | 7 |
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 |