소스 검색

Fix compiler warnings about unused variables in generated_message_reflection.h

Aurimas Liutikas 8 년 전
부모
커밋
a434bfc232
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/google/protobuf/generated_message_reflection.h

+ 2 - 0
src/google/protobuf/generated_message_reflection.h

@@ -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);