aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2017-02-28 15:08:07 -0800
committerAurimas Liutikas <aurimas@google.com>2017-02-28 15:08:07 -0800
commit4566a1da7dd83ad573f1778068b0b432ec0e9afc (patch)
tree43b1e7f8b4eaecc7e4e285e4535d448ba43b5975
parent6fd8f88ff5927e48a5836d451b7620855d19b4d9 (diff)
parent4bb8a91952f859be74b8938d821aabfd0a0f6e20 (diff)
downloadplatform_external_protobuf-oreo-dev.tar.gz
platform_external_protobuf-oreo-dev.tar.bz2
platform_external_protobuf-oreo-dev.zip
Change-Id: I0611d987875444dd5debfe53a423ef4f069a2241
-rw-r--r--src/google/protobuf/generated_message_reflection.h2
-rw-r--r--src/google/protobuf/wire_format.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h
index ed4e03348..4f25d4b3e 100644
--- a/src/google/protobuf/generated_message_reflection.h
+++ b/src/google/protobuf/generated_message_reflection.h
@@ -635,6 +635,8 @@ template<typename To, typename From>
inline To dynamic_cast_if_available(From from) {
#if defined(GOOGLE_PROTOBUF_NO_RTTI) || defined(__GXX_RTTI) || \
(defined(_MSC_VER)&&!defined(_CPPRTTI))
+ // Avoid the compiler warning about unused variables.
+ (void)from;
return NULL;
#else
return dynamic_cast<To>(from);
diff --git a/src/google/protobuf/wire_format.h b/src/google/protobuf/wire_format.h
index 941be75ba..5b41aadf1 100644
--- a/src/google/protobuf/wire_format.h
+++ b/src/google/protobuf/wire_format.h
@@ -326,6 +326,9 @@ inline void WireFormat::VerifyUTF8StringNamedField(
#ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED
WireFormatLite::VerifyUtf8String(
data, size, static_cast<WireFormatLite::Operation>(op), field_name);
+#else
+ // Avoid the compiler warning about unused variables.
+ (void)data; (void)size; (void)op; (void)field_name;
#endif
}