aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google
diff options
context:
space:
mode:
authorGravatar Swen Kooij <swen.kooij@fortech.ro>2016-01-28 11:40:07 +0200
committerGravatar Swen Kooij <swen.kooij@fortech.ro>2016-01-28 11:40:07 +0200
commit37d6cf9cfe017f899c91c42fd7dc905c2fd06309 (patch)
tree8c2848a98a73a2c54199d3002a078e284ef7dd1c /src/google
parentb13874d59e976371a1a87e6dc2bf347ed0a0ce5d (diff)
Fixed unused parameters and extra ';'
Diffstat (limited to 'src/google')
-rw-r--r--src/google/protobuf/arena.h2
-rwxr-xr-xsrc/google/protobuf/arenastring.h12
-rw-r--r--src/google/protobuf/descriptor.h10
-rw-r--r--src/google/protobuf/message.h32
-rw-r--r--src/google/protobuf/repeated_field.h6
-rw-r--r--src/google/protobuf/wire_format_lite_inl.h12
6 files changed, 37 insertions, 37 deletions
diff --git a/src/google/protobuf/arena.h b/src/google/protobuf/arena.h
index 6a35183e..5ad94fa9 100644
--- a/src/google/protobuf/arena.h
+++ b/src/google/protobuf/arena.h
@@ -76,7 +76,7 @@ template<typename T> void arena_destruct_object(void* object) {
template<typename T> void arena_delete_object(void* 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);
}
diff --git a/src/google/protobuf/arenastring.h b/src/google/protobuf/arenastring.h
index ef57033b..e2e2f254 100755
--- a/src/google/protobuf/arenastring.h
+++ b/src/google/protobuf/arenastring.h
@@ -64,7 +64,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
}
// 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_;
}
@@ -102,7 +102,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// state. Used to implement unsafe_arena_release_<field>() methods on
// generated classes.
inline ::std::string* UnsafeArenaRelease(const ::std::string* default_value,
- ::google::protobuf::Arena* arena) {
+ ::google::protobuf::Arena* /* arena */) {
if (ptr_ == default_value) {
return NULL;
}
@@ -134,7 +134,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// UnsafeArenaRelease() on another field of a message in the same arena. Used
// to implement unsafe_arena_set_allocated_<field> in generated classes.
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) {
ptr_ = value;
} else {
@@ -163,7 +163,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// the user) will always be the empty string. Assumes that |default_value|
// is an empty string.
inline void ClearToEmpty(const ::std::string* default_value,
- ::google::protobuf::Arena* arena) {
+ ::google::protobuf::Arena* /* arena */) {
if (ptr_ == default_value) {
// Already set to default (which is empty) -- do nothing.
} else {
@@ -175,7 +175,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
// overhead of heap operations. After this returns, the content (as seen by
// the user) will always be equal to |default_value|.
inline void ClearToDefault(const ::std::string* default_value,
- ::google::protobuf::Arena* arena) {
+ ::google::protobuf::Arena* /* arena */) {
if (ptr_ == default_value) {
// Already set to default -- do nothing.
} else {
@@ -215,7 +215,7 @@ struct LIBPROTOBUF_EXPORT ArenaStringPtr {
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_;
}
diff --git a/src/google/protobuf/descriptor.h b/src/google/protobuf/descriptor.h
index e7e8c6af..7e3a7496 100644
--- a/src/google/protobuf/descriptor.h
+++ b/src/google/protobuf/descriptor.h
@@ -1645,7 +1645,7 @@ PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
const Descriptor::ReservedRange*)
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_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_ARRAY_ACCESSOR(EnumDescriptor, value,
const EnumValueDescriptor*)
-PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions);
+PROTOBUF_DEFINE_OPTIONS_ACCESSOR(EnumDescriptor, EnumOptions)
PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
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_ARRAY_ACCESSOR(ServiceDescriptor, method,
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, full_name)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, service, const ServiceDescriptor*)
PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_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, 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, service_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_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
diff --git a/src/google/protobuf/message.h b/src/google/protobuf/message.h
index 7c27afd9..a4d9277e 100644
--- a/src/google/protobuf/message.h
+++ b/src/google/protobuf/message.h
@@ -739,9 +739,9 @@ class LIBPROTOBUF_EXPORT Reflection {
// specifyed by 'field' passing ownership to the message.
// TODO(tmarek): Make virtual after all subclasses have been
// updated.
- virtual void AddAllocatedMessage(Message* message,
- const FieldDescriptor* field,
- Message* new_entry) const {}
+ virtual void AddAllocatedMessage(Message* /* message */,
+ const FieldDescriptor* /*field */,
+ Message* /* new_entry */) const {}
// 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
// all the subclasses.
// Returns true if key is in map. Returns false if key is not in map field.
- virtual bool ContainsMapKey(const Message& message,
- const FieldDescriptor* field,
- const MapKey& key) const {
+ virtual bool ContainsMapKey(const Message& /* message*/,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */) const {
return false;
}
// 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
// value pointer to val and retuns true.
- virtual bool InsertOrLookupMapValue(Message* message,
- const FieldDescriptor* field,
- const MapKey& key,
- MapValueRef* val) const {
+ virtual bool InsertOrLookupMapValue(Message* /* message */,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */,
+ MapValueRef* /* val */) const {
return false;
}
// Delete and returns true if key is in the map field. Returns false
// otherwise.
- virtual bool DeleteMapValue(Message* message,
- const FieldDescriptor* field,
- const MapKey& key) const {
+ virtual bool DeleteMapValue(Message* /* mesage */,
+ const FieldDescriptor* /* field */,
+ const MapKey& /* key */) const {
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
// different from FieldSize which can have duplicate keys.
- virtual int MapSize(const Message& message,
- const FieldDescriptor* field) const {
+ virtual int MapSize(const Message& /* message */,
+ const FieldDescriptor* /* field */) const {
return 0;
}
// Help method for MapIterator.
friend class MapIterator;
virtual internal::MapFieldBase* MapData(
- Message* message, const FieldDescriptor* field) const {
+ Message* /* message */, const FieldDescriptor* /* field */) const {
return NULL;
}
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index 61f3f558..5447fa42 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -574,7 +574,7 @@ class GenericTypeHandler {
template <typename GenericType>
GenericType* GenericTypeHandler<GenericType>::NewFromPrototype(
- const GenericType* prototype, ::google::protobuf::Arena* arena) {
+ const GenericType* /* prototype */, ::google::protobuf::Arena* arena) {
return New(arena);
}
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
// to allow proto2-lite (which includes this header) to be independent of
// Message.
-DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message);
+DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES(Message)
#undef DECLARE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES
@@ -674,7 +674,7 @@ class LIBPROTOBUF_EXPORT StringTypeHandlerBase {
static inline ::google::protobuf::Arena* GetArena(string*) {
return NULL;
}
- static inline void* GetMaybeArenaPointer(string* value) {
+ static inline void* GetMaybeArenaPointer(string* /* value */) {
return NULL;
}
static inline void Delete(string* value, Arena* arena) {
diff --git a/src/google/protobuf/wire_format_lite_inl.h b/src/google/protobuf/wire_format_lite_inl.h
index b1c477d1..79493ca0 100644
--- a/src/google/protobuf/wire_format_lite_inl.h
+++ b/src/google/protobuf/wire_format_lite_inl.h
@@ -412,12 +412,12 @@ inline bool WireFormatLite::ReadPackedPrimitive< \
CPPTYPE, WireFormatLite::DECLARED_TYPE>(input, values); \
}
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
-READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT)
+READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE)
#undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE