Commit c5553a3d authored by liujisi@google.com's avatar liujisi@google.com

Down-integrate pending changes from internal repository after previous release.

parent e7f29379
...@@ -811,7 +811,7 @@ string* DescriptorPool::Tables::AllocateString(const string& value) { ...@@ -811,7 +811,7 @@ string* DescriptorPool::Tables::AllocateString(const string& value) {
} }
template<typename Type> template<typename Type>
Type* DescriptorPool::Tables::AllocateMessage(Type* dummy) { Type* DescriptorPool::Tables::AllocateMessage(Type* /* dummy */) {
Type* result = new Type; Type* result = new Type;
messages_.push_back(result); messages_.push_back(result);
return result; return result;
...@@ -3677,7 +3677,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto, ...@@ -3677,7 +3677,7 @@ void DescriptorBuilder::BuildEnumValue(const EnumValueDescriptorProto& proto,
} }
void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto, void DescriptorBuilder::BuildService(const ServiceDescriptorProto& proto,
const void* dummy, const void* /* dummy */,
ServiceDescriptor* result) { ServiceDescriptor* result) {
string* full_name = tables_->AllocateString(file_->package()); string* full_name = tables_->AllocateString(file_->package());
if (!full_name->empty()) full_name->append(1, '.'); if (!full_name->empty()) full_name->append(1, '.');
...@@ -3957,7 +3957,8 @@ void DescriptorBuilder::CrossLinkEnum( ...@@ -3957,7 +3957,8 @@ void DescriptorBuilder::CrossLinkEnum(
} }
void DescriptorBuilder::CrossLinkEnumValue( void DescriptorBuilder::CrossLinkEnumValue(
EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& proto) { EnumValueDescriptor* enum_value,
const EnumValueDescriptorProto& /* proto */) {
if (enum_value->options_ == NULL) { if (enum_value->options_ == NULL) {
enum_value->options_ = &EnumValueOptions::default_instance(); enum_value->options_ = &EnumValueOptions::default_instance();
} }
...@@ -4158,7 +4159,8 @@ void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm, ...@@ -4158,7 +4159,8 @@ void DescriptorBuilder::ValidateEnumOptions(EnumDescriptor* enm,
} }
void DescriptorBuilder::ValidateEnumValueOptions( void DescriptorBuilder::ValidateEnumValueOptions(
EnumValueDescriptor* enum_value, const EnumValueDescriptorProto& proto) { EnumValueDescriptor* /* enum_value */,
const EnumValueDescriptorProto& /* proto */) {
// Nothing to do so far. // Nothing to do so far.
} }
void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service, void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service,
...@@ -4176,8 +4178,8 @@ void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service, ...@@ -4176,8 +4178,8 @@ void DescriptorBuilder::ValidateServiceOptions(ServiceDescriptor* service,
VALIDATE_OPTIONS_FROM_ARRAY(service, method, Method); VALIDATE_OPTIONS_FROM_ARRAY(service, method, Method);
} }
void DescriptorBuilder::ValidateMethodOptions(MethodDescriptor* method, void DescriptorBuilder::ValidateMethodOptions(MethodDescriptor* /* method */,
const MethodDescriptorProto& proto) { const MethodDescriptorProto& /* proto */) {
// Nothing to do so far. // Nothing to do so far.
} }
...@@ -4805,14 +4807,16 @@ class AggregateErrorCollector : public io::ErrorCollector { ...@@ -4805,14 +4807,16 @@ class AggregateErrorCollector : public io::ErrorCollector {
public: public:
string error_; string error_;
virtual void AddError(int line, int column, const string& message) { virtual void AddError(int /* line */, int /* column */,
const string& message) {
if (!error_.empty()) { if (!error_.empty()) {
error_ += "; "; error_ += "; ";
} }
error_ += message; error_ += message;
} }
virtual void AddWarning(int line, int column, const string& message) { virtual void AddWarning(int /* line */, int /* column */,
const string& /* message */) {
// Ignore warnings // Ignore warnings
} }
}; };
......
...@@ -96,8 +96,8 @@ class LIBPROTOBUF_EXPORT DescriptorDatabase { ...@@ -96,8 +96,8 @@ class LIBPROTOBUF_EXPORT DescriptorDatabase {
// //
// This method has a default implementation that always returns // This method has a default implementation that always returns
// false. // false.
virtual bool FindAllExtensionNumbers(const string& extendee_type, virtual bool FindAllExtensionNumbers(const string& /* extendee_type */,
vector<int>* output) { vector<int>* /* output */) {
return false; return false;
} }
......
...@@ -794,7 +794,7 @@ class MessageTypeTraits { ...@@ -794,7 +794,7 @@ class MessageTypeTraits {
MutableType message, ExtensionSet* set) { MutableType message, ExtensionSet* set) {
set->SetAllocatedMessage(number, field_type, NULL, message); set->SetAllocatedMessage(number, field_type, NULL, message);
} }
static inline MutableType Release(int number, FieldType field_type, static inline MutableType Release(int number, FieldType /* field_type */,
ExtensionSet* set) { ExtensionSet* set) {
return static_cast<Type*>(set->ReleaseMessage( return static_cast<Type*>(set->ReleaseMessage(
number, Type::default_instance())); number, Type::default_instance()));
......
...@@ -777,7 +777,7 @@ string GeneratedMessageReflection::GetString( ...@@ -777,7 +777,7 @@ string GeneratedMessageReflection::GetString(
const string& GeneratedMessageReflection::GetStringReference( const string& GeneratedMessageReflection::GetStringReference(
const Message& message, const Message& message,
const FieldDescriptor* field, string* scratch) const { const FieldDescriptor* field, string* /* scratch */) const {
USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING); USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING);
if (field->is_extension()) { if (field->is_extension()) {
return GetExtensionSet(message).GetString(field->number(), return GetExtensionSet(message).GetString(field->number(),
...@@ -838,7 +838,7 @@ string GeneratedMessageReflection::GetRepeatedString( ...@@ -838,7 +838,7 @@ string GeneratedMessageReflection::GetRepeatedString(
const string& GeneratedMessageReflection::GetRepeatedStringReference( const string& GeneratedMessageReflection::GetRepeatedStringReference(
const Message& message, const FieldDescriptor* field, const Message& message, const FieldDescriptor* field,
int index, string* scratch) const { int index, string* /* scratch */) const {
USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING); USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING);
if (field->is_extension()) { if (field->is_extension()) {
return GetExtensionSet(message).GetRepeatedString(field->number(), index); return GetExtensionSet(message).GetRepeatedString(field->number(), index);
......
...@@ -67,7 +67,8 @@ class LIBPROTOBUF_EXPORT ErrorCollector { ...@@ -67,7 +67,8 @@ class LIBPROTOBUF_EXPORT ErrorCollector {
// Indicates that there was a warning in the input at the given line and // Indicates that there was a warning in the input at the given line and
// column numbers. The numbers are zero-based, so you may want to add // column numbers. The numbers are zero-based, so you may want to add
// 1 to each before printing them. // 1 to each before printing them.
virtual void AddWarning(int line, int column, const string& message) { } virtual void AddWarning(int /* line */, int /* column */,
const string& /* message */) { }
private: private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector); GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ErrorCollector);
......
...@@ -149,7 +149,7 @@ int Message::ByteSize() const { ...@@ -149,7 +149,7 @@ int Message::ByteSize() const {
return size; return size;
} }
void Message::SetCachedSize(int size) const { void Message::SetCachedSize(int /* size */) const {
GOOGLE_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name() GOOGLE_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name()
<< "\" implements neither SetCachedSize() nor ByteSize(). " << "\" implements neither SetCachedSize() nor ByteSize(). "
"Must implement one or the other."; "Must implement one or the other.";
...@@ -216,7 +216,8 @@ HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1); ...@@ -216,7 +216,8 @@ HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1);
#undef HANDLE_TYPE #undef HANDLE_TYPE
void* Reflection::MutableRawRepeatedString( void* Reflection::MutableRawRepeatedString(
Message* message, const FieldDescriptor* field, bool is_string) const { Message* message, const FieldDescriptor* field,
bool /* is_string */) const {
return MutableRawRepeatedField(message, field, return MutableRawRepeatedField(message, field,
FieldDescriptor::CPPTYPE_STRING, FieldOptions::STRING, NULL); FieldDescriptor::CPPTYPE_STRING, FieldOptions::STRING, NULL);
} }
......
...@@ -179,7 +179,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR ...@@ -179,7 +179,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#elif defined(__GNUC__) #elif defined(__GNUC__)
#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) #if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
#include <google/protobuf/stubs/atomicops_internals_x86_gcc.h> #include <google/protobuf/stubs/atomicops_internals_x86_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_ARM) #elif defined(GOOGLE_PROTOBUF_ARCH_ARM) && defined(__linux__)
#include <google/protobuf/stubs/atomicops_internals_arm_gcc.h> #include <google/protobuf/stubs/atomicops_internals_arm_gcc.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64) #elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64)
#include <google/protobuf/stubs/atomicops_internals_arm64_gcc.h> #include <google/protobuf/stubs/atomicops_internals_arm64_gcc.h>
...@@ -187,7 +187,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR ...@@ -187,7 +187,7 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#include <google/protobuf/stubs/atomicops_internals_arm_qnx.h> #include <google/protobuf/stubs/atomicops_internals_arm_qnx.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_MIPS) #elif defined(GOOGLE_PROTOBUF_ARCH_MIPS)
#include <google/protobuf/stubs/atomicops_internals_mips_gcc.h> #include <google/protobuf/stubs/atomicops_internals_mips_gcc.h>
#elif defined(__pnacl__) #elif defined(__native_client__)
#include <google/protobuf/stubs/atomicops_internals_pnacl.h> #include <google/protobuf/stubs/atomicops_internals_pnacl.h>
#else #else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR GOOGLE_PROTOBUF_ATOMICOPS_ERROR
......
...@@ -115,8 +115,8 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line, ...@@ -115,8 +115,8 @@ void DefaultLogHandler(LogLevel level, const char* filename, int line,
fflush(stderr); // Needed on MSVC. fflush(stderr); // Needed on MSVC.
} }
void NullLogHandler(LogLevel level, const char* filename, int line, void NullLogHandler(LogLevel /* level */, const char* /* filename */,
const string& message) { int /* line */, const string& /* message */) {
// Nothing. // Nothing.
} }
......
...@@ -720,7 +720,8 @@ class LIBPROTOBUF_EXPORT LogFinisher { ...@@ -720,7 +720,8 @@ class LIBPROTOBUF_EXPORT LogFinisher {
namespace internal { namespace internal {
template<typename T> template<typename T>
T* CheckNotNull(const char *file, int line, const char *name, T* val) { T* CheckNotNull(const char* /* file */, int /* line */,
const char* name, T* val) {
if (val == NULL) { if (val == NULL) {
GOOGLE_LOG(FATAL) << name; GOOGLE_LOG(FATAL) << name;
} }
......
...@@ -1075,7 +1075,7 @@ bool TextFormat::Parser::MergeFromString(const string& input, ...@@ -1075,7 +1075,7 @@ bool TextFormat::Parser::MergeFromString(const string& input,
return Merge(&input_stream, output); return Merge(&input_stream, output);
} }
bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* input, bool TextFormat::Parser::MergeUsingImpl(io::ZeroCopyInputStream* /* input */,
Message* output, Message* output,
ParserImpl* parser_impl) { ParserImpl* parser_impl) {
if (!parser_impl->Parse(output)) return false; if (!parser_impl->Parse(output)) return false;
...@@ -1280,8 +1280,8 @@ void TextFormat::Printer::PrintShortRepeatedField( ...@@ -1280,8 +1280,8 @@ void TextFormat::Printer::PrintShortRepeatedField(
} }
} }
void TextFormat::Printer::PrintFieldName(const Message& message, void TextFormat::Printer::PrintFieldName(const Message& /* message */,
const Reflection* reflection, const Reflection* /* reflection */,
const FieldDescriptor* field, const FieldDescriptor* field,
TextGenerator& generator) const { TextGenerator& generator) const {
if (field->is_extension()) { if (field->is_extension()) {
......
...@@ -182,7 +182,7 @@ bool FieldSkipper::SkipMessage(io::CodedInputStream* input) { ...@@ -182,7 +182,7 @@ bool FieldSkipper::SkipMessage(io::CodedInputStream* input) {
} }
void FieldSkipper::SkipUnknownEnum( void FieldSkipper::SkipUnknownEnum(
int field_number, int value) { int /* field_number */, int /* value */) {
// Nothing. // Nothing.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment