diff options
author | Aurimas Liutikas <aurimas@google.com> | 2017-02-28 22:54:42 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-02-28 22:54:42 +0000 |
commit | f1376b3a24f1efff8bd9e0eda97d54800e090475 (patch) | |
tree | 6678b2996fac05dbf7781a309cf0fe54e0b16302 | |
parent | 89ebbfb9a9383239ea7a4824aabf966b896b66cf (diff) | |
parent | c0074f6e81857c5471bfc5ea0f847e74b236af1c (diff) | |
download | protobuf-f1376b3a24f1efff8bd9e0eda97d54800e090475.tar.gz |
Merge "Pull in two patches from protobuf upstream to suppress warnings"android-o-preview-1android-n-mr2-preview-2o-preview
-rw-r--r-- | src/google/protobuf/generated_message_reflection.h | 2 | ||||
-rw-r--r-- | src/google/protobuf/wire_format.h | 3 |
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 b6671ad06..e0e041ad0 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h @@ -491,6 +491,8 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection : public Reflection { template<typename To, typename From> inline To dynamic_cast_if_available(From from) { #if defined(GOOGLE_PROTOBUF_NO_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 9f26eb29b..c13ff5e0c 100644 --- a/src/google/protobuf/wire_format.h +++ b/src/google/protobuf/wire_format.h @@ -325,6 +325,9 @@ inline void WireFormat::VerifyUTF8StringNamedField( const char* field_name) { #ifdef GOOGLE_PROTOBUF_UTF8_VALIDATION_ENABLED WireFormat::VerifyUTF8StringFallback(data, size, op, field_name); +#else + // Avoid the compiler warning about unused variables. + (void)data; (void)size; (void)op; (void)field_name; #endif } |