Fixed unused parameters and extra ';'
This commit is contained in:
parent
b13874d59e
commit
37d6cf9cfe
@ -76,7 +76,7 @@ template<typename T> void arena_destruct_object(void* object) {
|
|||||||
template<typename T> void arena_delete_object(void* object) {
|
template<typename T> void arena_delete_object(void* object) {
|
||||||
delete reinterpret_cast<T*>(object);
|
delete reinterpret_cast<T*>(object);
|
||||||
}
|
}
|
||||||
inline void arena_free(void* object, size_t size) {
|
inline void arena_free(void* object, size_t /* size */) {
|
||||||
free(object);
|
free(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Basic accessors.
|
// Basic accessors.
|
||||||
inline const ::std::string& Get(const ::std::string* default_value) const {
|
inline const ::std::string& Get(const ::std::string* /* default_value */) const {
|
||||||
return *ptr_;
|
return *ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
// state. Used to implement unsafe_arena_release_<field>() methods on
|
// state. Used to implement unsafe_arena_release_<field>() methods on
|
||||||
// generated classes.
|
// generated classes.
|
||||||
inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value,
|
inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value,
|
||||||
::google::protobuf::Arena* arena) {
|
::google::protobuf::Arena* /* arena */) {
|
||||||
if (ptr_ == default_value) {
|
if (ptr_ == default_value) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
// UnsafeArenaRelease() on another field of a message in the same arena. Used
|
// UnsafeArenaRelease() on another field of a message in the same arena. Used
|
||||||
// to implement unsafe_arena_set_allocated_<field> in generated classes.
|
// to implement unsafe_arena_set_allocated_<field> in generated classes.
|
||||||
inline void UnsafeArenaSetAllocated(const ::std::string* default_value,
|
inline void UnsafeArenaSetAllocated(const ::std::string* default_value,
|
||||||
::std::string* value, ::google::protobuf::Arena* arena) {
|
::std::string* value, ::google::protobuf::Arena* /* arena */) {
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
ptr_ = value;
|
ptr_ = value;
|
||||||
} else {
|
} else {
|
||||||
@ -163,7 +163,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
// the user) will always be the empty string. Assumes that |default_value|
|
// the user) will always be the empty string. Assumes that |default_value|
|
||||||
// is an empty string.
|
// is an empty string.
|
||||||
inline void ClearToEmpty(const ::std::string* default_value,
|
inline void ClearToEmpty(const ::std::string* default_value,
|
||||||
::google::protobuf::Arena* arena) {
|
::google::protobuf::Arena* /* arena */) {
|
||||||
if (ptr_ == default_value) {
|
if (ptr_ == default_value) {
|
||||||
// Already set to default (which is empty) -- do nothing.
|
// Already set to default (which is empty) -- do nothing.
|
||||||
} else {
|
} else {
|
||||||
@ -175,7 +175,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
// overhead of heap operations. After this returns, the content (as seen by
|
// overhead of heap operations. After this returns, the content (as seen by
|
||||||
// the user) will always be equal to |default_value|.
|
// the user) will always be equal to |default_value|.
|
||||||
inline void ClearToDefault(const ::std::string* default_value,
|
inline void ClearToDefault(const ::std::string* default_value,
|
||||||
::google::protobuf::Arena* arena) {
|
::google::protobuf::Arena* /* arena */) {
|
||||||
if (ptr_ == default_value) {
|
if (ptr_ == default_value) {
|
||||||
// Already set to default -- do nothing.
|
// Already set to default -- do nothing.
|
||||||
} else {
|
} else {
|
||||||
@ -215,7 +215,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
|
|||||||
|
|
||||||
void AssignWithDefault(const ::std::string* default_value, ArenaStringPtr value);
|
void AssignWithDefault(const ::std::string* default_value, ArenaStringPtr value);
|
||||||
|
|
||||||
inline const ::std::string& GetNoArena(const ::std::string* default_value) const {
|
inline const ::std::string& GetNoArena(const ::std::string* /* default_value */) const {
|
||||||
return *ptr_;
|
return *ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1645,7 +1645,7 @@ PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
|
|||||||
const Descriptor::ReservedRange*)
|
const Descriptor::ReservedRange*)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
|
||||||
|
|
||||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions);
|
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
|
PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
|
||||||
|
|
||||||
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name)
|
PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, name)
|
||||||
@ -1690,7 +1690,7 @@ PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*)
|
|||||||
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
|
||||||
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
|
PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor, value,
|
||||||
const EnumValueDescriptor*)
|
const EnumValueDescriptor*)
|
||||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions);
|
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
|
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
|
||||||
|
|
||||||
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name)
|
PROTOBUF_DEFINE_STRING_ACCESSOR(EnumValueDescriptor, name)
|
||||||
@ -1705,14 +1705,14 @@ PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, file, const FileDescriptor*)
|
|||||||
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
|
||||||
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
|
PROTOBUF_DEFINE_ARRAY_ACCESSOR(ServiceDescriptor, method,
|
||||||
const MethodDescriptor*)
|
const MethodDescriptor*)
|
||||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions);
|
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(ServiceDescriptor, ServiceOptions)
|
||||||
|
|
||||||
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name)
|
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, name)
|
||||||
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name)
|
PROTOBUF_DEFINE_STRING_ACCESSOR(MethodDescriptor, full_name)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
|
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
|
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
|
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
|
||||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions);
|
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(MethodDescriptor, MethodOptions)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool)
|
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, client_streaming, bool)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool)
|
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, server_streaming, bool)
|
||||||
|
|
||||||
@ -1726,7 +1726,7 @@ PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int)
|
|||||||
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
|
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
|
||||||
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions);
|
PROTOBUF_DEFINE_OPTIONS_ACCESSOR(FileDescriptor, FileOptions)
|
||||||
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
|
PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
|
||||||
|
|
||||||
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
|
PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
|
||||||
|
@ -739,9 +739,9 @@ class LIBPROTOBUF_EXPORT Reflection {
|
|||||||
// specifyed by 'field' passing ownership to the message.
|
// specifyed by 'field' passing ownership to the message.
|
||||||
// TODO(tmarek): Make virtual after all subclasses have been
|
// TODO(tmarek): Make virtual after all subclasses have been
|
||||||
// updated.
|
// updated.
|
||||||
virtual void AddAllocatedMessage(Message* message,
|
virtual void AddAllocatedMessage(Message* /* message */,
|
||||||
const FieldDescriptor* field,
|
const FieldDescriptor* /*field */,
|
||||||
Message* new_entry) const {}
|
Message* /* new_entry */) const {}
|
||||||
|
|
||||||
|
|
||||||
// Get a RepeatedFieldRef object that can be used to read the underlying
|
// Get a RepeatedFieldRef object that can be used to read the underlying
|
||||||
@ -947,27 +947,27 @@ class LIBPROTOBUF_EXPORT Reflection {
|
|||||||
// TODO(jieluo) - make the map APIs pure virtual after updating
|
// TODO(jieluo) - make the map APIs pure virtual after updating
|
||||||
// all the subclasses.
|
// all the subclasses.
|
||||||
// Returns true if key is in map. Returns false if key is not in map field.
|
// Returns true if key is in map. Returns false if key is not in map field.
|
||||||
virtual bool ContainsMapKey(const Message& message,
|
virtual bool ContainsMapKey(const Message& /* message*/,
|
||||||
const FieldDescriptor* field,
|
const FieldDescriptor* /* field */,
|
||||||
const MapKey& key) const {
|
const MapKey& /* key */) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If key is in map field: Saves the value pointer to val and returns
|
// If key is in map field: Saves the value pointer to val and returns
|
||||||
// false. If key in not in map field: Insert the key into map, saves
|
// false. If key in not in map field: Insert the key into map, saves
|
||||||
// value pointer to val and retuns true.
|
// value pointer to val and retuns true.
|
||||||
virtual bool InsertOrLookupMapValue(Message* message,
|
virtual bool InsertOrLookupMapValue(Message* /* message */,
|
||||||
const FieldDescriptor* field,
|
const FieldDescriptor* /* field */,
|
||||||
const MapKey& key,
|
const MapKey& /* key */,
|
||||||
MapValueRef* val) const {
|
MapValueRef* /* val */) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete and returns true if key is in the map field. Returns false
|
// Delete and returns true if key is in the map field. Returns false
|
||||||
// otherwise.
|
// otherwise.
|
||||||
virtual bool DeleteMapValue(Message* message,
|
virtual bool DeleteMapValue(Message* /* mesage */,
|
||||||
const FieldDescriptor* field,
|
const FieldDescriptor* /* field */,
|
||||||
const MapKey& key) const {
|
const MapKey& /* key */) const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,15 +987,15 @@ class LIBPROTOBUF_EXPORT Reflection {
|
|||||||
|
|
||||||
// Get the number of <key, value> pair of a map field. The result may be
|
// Get the number of <key, value> pair of a map field. The result may be
|
||||||
// different from FieldSize which can have duplicate keys.
|
// different from FieldSize which can have duplicate keys.
|
||||||
virtual int MapSize(const Message& message,
|
virtual int MapSize(const Message& /* message */,
|
||||||
const FieldDescriptor* field) const {
|
const FieldDescriptor* /* field */) const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Help method for MapIterator.
|
// Help method for MapIterator.
|
||||||
friend class MapIterator;
|
friend class MapIterator;
|
||||||
virtual internal::MapFieldBase* MapData(
|
virtual internal::MapFieldBase* MapData(
|
||||||
Message* message, const FieldDescriptor* field) const {
|
Message* /* message */, const FieldDescriptor* /* field */) const {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +574,7 @@ class GenericTypeHandler {
|
|||||||
|
|
||||||
template <typename GenericType>
|
template <typename GenericType>
|
||||||
GenericType* GenericTypeHandler<GenericType>::NewFromPrototype(
|
GenericType* GenericTypeHandler<GenericType>::NewFromPrototype(
|
||||||
const GenericType* prototype, ::google::protobuf::Arena* arena) {
|
const GenericType* /* prototype */, ::google::protobuf::Arena* arena) {
|
||||||
return New(arena);
|
return New(arena);
|
||||||
}
|
}
|
||||||
template <typename GenericType>
|
template <typename GenericType>
|
||||||
@ -627,7 +627,7 @@ void GenericTypeHandler<MessageLite>::Merge(const MessageLite& from,
|
|||||||
// Message specialization bodies defined in message.cc. This split is necessary
|
// Message specialization bodies defined in message.cc. This split is necessary
|
||||||
// to allow proto2-lite (which includes this header) to be independent of
|
// to allow proto2-lite (which includes this header) to be independent of
|
||||||
// Message.
|
// Message.
|
||||||
DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message);
|
DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message)
|
||||||
|
|
||||||
|
|
||||||
#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
|
#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
|
||||||
@ -674,7 +674,7 @@ class LIBPROTOBUF_EXPORT StringTypeHandlerBase {
|
|||||||
static inline ::google::protobuf::Arena* GetArena(string*) {
|
static inline ::google::protobuf::Arena* GetArena(string*) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
static inline void* GetMaybeArenaPointer(string* value) {
|
static inline void* GetMaybeArenaPointer(string* /* value */) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
static inline void Delete(string* value, Arena* arena) {
|
static inline void Delete(string* value, Arena* arena) {
|
||||||
|
@ -412,12 +412,12 @@ inline bool WireFormatLite::ReadPackedPrimitive< \
|
|||||||
CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
|
CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
|
||||||
}
|
}
|
||||||
|
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32)
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64)
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32)
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64)
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT)
|
||||||
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
|
READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE)
|
||||||
|
|
||||||
#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
|
#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user