Ver código fonte

Fix unused-parameter clang warnings in arena.h and map_type_handler.h

Ben Bader 6 anos atrás
pai
commit
de57caa1fd

+ 1 - 0
src/google/protobuf/arena.h

@@ -688,6 +688,7 @@ class PROTOBUF_EXPORT alignas(8) Arena final {
                                         !has_get_arena<T>::value,
                                     int>::type = 0>
   PROTOBUF_ALWAYS_INLINE static Arena* GetArenaInternal(const T* value) {
+    (void) value;
     return nullptr;
   }
 

+ 1 - 0
src/google/protobuf/map_type_handler.h

@@ -524,6 +524,7 @@ inline const char* ReadSFIXED32(const char* ptr, int32* value) {
   template <typename Type>                                                  \
   const char* MapTypeHandler<WireFormatLite::TYPE_##FieldType, Type>::Read( \
       const char* begin, ParseContext* ctx, MapEntryAccessorType* value) {  \
+    (void) ctx;                                                             \
     return Read##FieldType(begin, value);                                   \
   }