Skip to content

Commit

Permalink
Fix compiler warnings about unused variables in generated_message_ref…
Browse files Browse the repository at this point in the history
…lection.h
  • Loading branch information
liutikas committed Feb 22, 2017
1 parent 1a8cbfd commit a434bfc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/google/protobuf/generated_message_reflection.h
Expand Up @@ -674,6 +674,8 @@ class LIBPROTOBUF_EXPORT GeneratedMessageReflection PROTOBUF_FINAL
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);
Expand Down

0 comments on commit a434bfc

Please sign in to comment.