commit | c0074f6e81857c5471bfc5ea0f847e74b236af1c | [log] [tgz] |
---|---|---|
author | Aurimas Liutikas <aurimas@google.com> | Tue Feb 28 12:09:21 2017 -0800 |
committer | Aurimas Liutikas <aurimas@google.com> | Tue Feb 28 12:09:21 2017 -0800 |
tree | 6678b2996fac05dbf7781a309cf0fe54e0b16302 | |
parent | 89ebbfb9a9383239ea7a4824aabf966b896b66cf [diff] |
Pull in two patches from protobuf upstream to suppress warnings This patch pull in two commits from upsteam of protobuf to suppress unused paramater warnings need in android builds. https://github.com/google/protobuf/commit/9079079ec0dac15700400a8c86b12595e9524901 https://github.com/google/protobuf/commit/a434bfc232de09de7d3ebc963290c960462212cb Test: None Change-Id: Ib399a495b7462b47cc7bd8f838bcaf31b70e66b5
diff --git a/src/google/protobuf/generated_message_reflection.h b/src/google/protobuf/generated_message_reflection.h index b6671ad..e0e041a 100644 --- a/src/google/protobuf/generated_message_reflection.h +++ b/src/google/protobuf/generated_message_reflection.h
@@ -491,6 +491,8 @@ 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 9f26eb2..c13ff5e 100644 --- a/src/google/protobuf/wire_format.h +++ b/src/google/protobuf/wire_format.h
@@ -325,6 +325,9 @@ 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 }