Fix unused variable warnings outside of compiler directory (#8945)

pull/7169/head^2
Sil3ntStorm 3 years ago committed by GitHub
parent e9b977fdce
commit 32677158b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/google/protobuf/descriptor.cc
  2. 10
      src/google/protobuf/generated_message_reflection.cc
  3. 6
      src/google/protobuf/generated_message_tctable_impl.h
  4. 8
      src/google/protobuf/generated_message_util.cc
  5. 2
      src/google/protobuf/io/io_win32.cc
  6. 2
      src/google/protobuf/io/zero_copy_stream_impl.cc
  7. 2
      src/google/protobuf/message_lite.cc
  8. 4
      src/google/protobuf/parse_context.cc
  9. 18
      src/google/protobuf/reflection_internal.h
  10. 2
      src/google/protobuf/stubs/mathutil.h
  11. 2
      src/google/protobuf/stubs/statusor.h
  12. 22
      src/google/protobuf/text_format.cc
  13. 2
      src/google/protobuf/unknown_field_set.cc
  14. 4
      src/google/protobuf/util/field_comparator.cc
  15. 2
      src/google/protobuf/util/internal/datapiece.h
  16. 16
      src/google/protobuf/util/internal/error_listener.h
  17. 2
      src/google/protobuf/util/internal/json_stream_parser.cc
  18. 20
      src/google/protobuf/util/internal/protostream_objectsource.cc
  19. 24
      src/google/protobuf/util/message_differencer.cc
  20. 4
      src/google/protobuf/wire_format_lite.cc

@ -6033,7 +6033,7 @@ void DescriptorBuilder::CrossLinkMessage(Descriptor* message,
void DescriptorBuilder::CrossLinkExtensionRange(
Descriptor::ExtensionRange* range,
const DescriptorProto::ExtensionRange& proto) {
const DescriptorProto::ExtensionRange& /*proto*/) {
if (range->options_ == nullptr) {
range->options_ = &ExtensionRangeOptions::default_instance();
}
@ -6675,8 +6675,8 @@ void DescriptorBuilder::ValidateEnumValueOptions(
}
void DescriptorBuilder::ValidateExtensionRangeOptions(
const std::string& full_name, Descriptor::ExtensionRange* extension_range,
const DescriptorProto_ExtensionRange& proto) {
const std::string& /*full_name*/, Descriptor::ExtensionRange* /*extension_range*/,
const DescriptorProto_ExtensionRange& /*proto*/) {
}
void DescriptorBuilder::ValidateServiceOptions(
@ -7554,7 +7554,7 @@ class DescriptorBuilder::OptionInterpreter::AggregateOptionFinder
public:
DescriptorBuilder* builder_;
const Descriptor* FindAnyType(const Message& message,
const Descriptor* FindAnyType(const Message& /*message*/,
const std::string& prefix,
const std::string& name) const override {
if (prefix != internal::kTypeGoogleApisComPrefix &&
@ -7747,7 +7747,7 @@ void DescriptorBuilder::OptionInterpreter::SetUInt64(
}
void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto,
const FileDescriptor* result) {
const FileDescriptor* /*result*/) {
if (!unused_dependency_.empty()) {
auto itr = pool_->unused_import_track_files_.find(proto.name());
@ -7769,7 +7769,7 @@ void DescriptorBuilder::LogUnusedDependency(const FileDescriptorProto& proto,
}
Symbol DescriptorPool::CrossLinkOnDemandHelper(StringPiece name,
bool expecting_enum) const {
bool /*expecting_enum*/) const {
auto lookup_name = std::string(name);
if (!lookup_name.empty() && lookup_name[0] == '.') {
lookup_name = lookup_name.substr(1);

@ -1611,7 +1611,7 @@ std::string Reflection::GetString(const Message& message,
const std::string& Reflection::GetStringReference(const Message& message,
const FieldDescriptor* field,
std::string* scratch) const {
std::string* /*scratch*/) const {
USAGE_CHECK_ALL(GetStringReference, SINGULAR, STRING);
if (field->is_extension()) {
return GetExtensionSet(message).GetString(field->number(),
@ -1699,7 +1699,7 @@ std::string Reflection::GetRepeatedString(const Message& message,
const std::string& Reflection::GetRepeatedStringReference(
const Message& message, const FieldDescriptor* field, int index,
std::string* scratch) const {
std::string* /*scratch*/) const {
USAGE_CHECK_ALL(GetRepeatedStringReference, REPEATED, STRING);
if (field->is_extension()) {
return GetExtensionSet(message).GetRepeatedString(field->number(), index);
@ -2237,7 +2237,7 @@ void Reflection::UnsafeArenaAddAllocatedMessage(Message* message,
void* Reflection::MutableRawRepeatedField(Message* message,
const FieldDescriptor* field,
FieldDescriptor::CppType cpptype,
int ctype,
int /*ctype*/,
const Descriptor* desc) const {
USAGE_CHECK_REPEATED("MutableRawRepeatedField");
CheckInvalidAccess(schema_, field);
@ -2656,7 +2656,7 @@ HANDLE_TYPE(bool, FieldDescriptor::CPPTYPE_BOOL, -1);
void* Reflection::MutableRawRepeatedString(Message* message,
const FieldDescriptor* field,
bool is_string) const {
bool /*is_string*/) const {
return MutableRawRepeatedField(message, field,
FieldDescriptor::CPPTYPE_STRING,
FieldOptions::STRING, nullptr);
@ -3011,7 +3011,7 @@ void RegisterFileLevelMetadata(const DescriptorTable* table) {
}
void UnknownFieldSetSerializer(const uint8_t* base, uint32_t offset,
uint32_t tag, uint32_t has_offset,
uint32_t /*tag*/, uint32_t /*has_offset*/,
io::CodedOutputStream* output) {
const void* ptr = base + offset;
const InternalMetadata* metadata = static_cast<const InternalMetadata*>(ptr);

@ -187,12 +187,17 @@ class TcParserBase {
protected:
static inline PROTOBUF_ALWAYS_INLINE const char* Return(
PROTOBUF_TC_PARAM_DECL) {
(void)data;
(void)ctx;
SyncHasbits(msg, hasbits, table);
return ptr;
}
static inline PROTOBUF_ALWAYS_INLINE const char* Error(
PROTOBUF_TC_PARAM_DECL) {
(void)data;
(void)ctx;
(void)ptr;
SyncHasbits(msg, hasbits, table);
return nullptr;
}
@ -224,6 +229,7 @@ class TcParserBase {
ctx->SetLastTag(tag);
return ptr;
}
(void)data;
uint32_t num = tag >> 3;
if (table->extension_range_low <= num &&
num <= table->extension_range_high) {

@ -316,7 +316,7 @@ void SerializeMessageNoTable(const MessageLite* msg, ArrayOutput* output) {
// Helper to branch to fast path if possible
void SerializeMessageDispatch(const MessageLite& msg,
const FieldMetadata* field_table, int num_fields,
int32_t cached_size,
int32_t /*cached_size*/,
io::CodedOutputStream* output) {
const uint8_t* base = reinterpret_cast<const uint8_t*>(&msg);
SerializeInternal(base, field_table, num_fields, output);
@ -325,7 +325,7 @@ void SerializeMessageDispatch(const MessageLite& msg,
// Helper to branch to fast path if possible
void SerializeMessageDispatch(const MessageLite& msg,
const FieldMetadata* field_table, int num_fields,
int32_t cached_size, ArrayOutput* output) {
int32_t /*cached_size*/, ArrayOutput* output) {
const uint8_t* base = reinterpret_cast<const uint8_t*>(&msg);
output->ptr = SerializeInternalToArray(base, field_table, num_fields,
output->is_deterministic, output->ptr);
@ -523,7 +523,7 @@ struct PackedFieldHelper {
template <>
struct PackedFieldHelper<WireFormatLite::TYPE_STRING> {
template <typename O>
static void Serialize(const void* field, const FieldMetadata& md, O* output) {
static void Serialize(const void* /*field*/, const FieldMetadata& md, O* /*output*/) {
GOOGLE_LOG(FATAL) << "Not implemented field number " << md.tag << " with type "
<< md.type;
}
@ -726,7 +726,7 @@ void ExtensionSerializer(const MessageLite* extendee, const uint8_t* ptr,
}
void UnknownFieldSerializerLite(const uint8_t* ptr, uint32_t offset,
uint32_t tag, uint32_t has_offset,
uint32_t /*tag*/, uint32_t /*has_offset*/,
io::CodedOutputStream* output) {
output->WriteString(
reinterpret_cast<const InternalMetadata*>(ptr + offset)

@ -266,7 +266,7 @@ int open(const char* path, int flags, int mode) {
#endif
}
int mkdir(const char* path, int _mode) {
int mkdir(const char* path, int /*_mode*/) {
#ifdef SUPPORT_LONGPATHS
wstring wpath;
if (!as_windows_path(path, &wpath)) {

@ -170,7 +170,7 @@ int FileInputStream::CopyingFileInputStream::Skip(int count) {
// ===================================================================
FileOutputStream::FileOutputStream(int file_descriptor, int block_size)
FileOutputStream::FileOutputStream(int file_descriptor, int /*block_size*/)
: CopyingOutputStreamAdaptor(&copying_output_),
copying_output_(file_descriptor) {}

@ -118,7 +118,7 @@ inline StringPiece as_string_view(const void* data, int size) {
}
// Returns true of all required fields are present / have values.
inline bool CheckFieldPresence(const internal::ParseContext& ctx,
inline bool CheckFieldPresence(const internal::ParseContext& /*ctx*/,
const MessageLite& msg,
MessageLite::ParseFlags parse_flags) {
if (PROTOBUF_PREDICT_FALSE((parse_flags & MessageLite::kMergePartial) != 0)) {

@ -205,7 +205,7 @@ std::pair<const char*, bool> EpsCopyInputStream::DoneFallback(int overrun,
}
const char* EpsCopyInputStream::SkipFallback(const char* ptr, int size) {
return AppendSize(ptr, size, [](const char* p, int s) {});
return AppendSize(ptr, size, [](const char* /*p*/, int /*s*/) {});
}
const char* EpsCopyInputStream::ReadStringFallback(const char* ptr, int size,
@ -237,7 +237,7 @@ const char* EpsCopyInputStream::AppendStringFallback(const char* ptr, int size,
template <int>
void byteswap(void* p);
template <>
void byteswap<1>(void* p) {}
void byteswap<1>(void* /*p*/) {}
template <>
void byteswap<4>(void* p) {
*static_cast<uint32_t*>(p) = bswap_32(*static_cast<uint32_t*>(p));

@ -43,25 +43,25 @@ namespace internal {
// corresponding random-access methods.
class RandomAccessRepeatedFieldAccessor : public RepeatedFieldAccessor {
public:
Iterator* BeginIterator(const Field* data) const override {
Iterator* BeginIterator(const Field* /*data*/) const override {
return PositionToIterator(0);
}
Iterator* EndIterator(const Field* data) const override {
return PositionToIterator(this->Size(data));
}
Iterator* CopyIterator(const Field* data,
Iterator* CopyIterator(const Field* /*data*/,
const Iterator* iterator) const override {
return const_cast<Iterator*>(iterator);
}
Iterator* AdvanceIterator(const Field* data,
Iterator* AdvanceIterator(const Field* /*data*/,
Iterator* iterator) const override {
return PositionToIterator(IteratorToPosition(iterator) + 1);
}
bool EqualsIterator(const Field* data, const Iterator* a,
bool EqualsIterator(const Field* /*data*/, const Iterator* a,
const Iterator* b) const override {
return a == b;
}
void DeleteIterator(const Field* data, Iterator* iterator) const override {}
void DeleteIterator(const Field* /*data*/, Iterator* /*iterator*/) const override {}
const Value* GetIteratorValue(const Field* data, const Iterator* iterator,
Value* scratch_space) const override {
return Get(data, static_cast<int>(IteratorToPosition(iterator)),
@ -257,7 +257,7 @@ class MapFieldAccessor final : public RandomAccessRepeatedFieldAccessor {
// Convert a MapEntry message stored in the underlying MapFieldBase to an
// object that will be returned by this accessor.
virtual const Value* ConvertFromEntry(const Message& value,
Value* scratch_space) const {
Value* /*scratch_space*/) const {
return static_cast<const Value*>(&value);
}
};
@ -285,7 +285,7 @@ class RepeatedFieldPrimitiveAccessor final : public RepeatedFieldWrapper<T> {
return *static_cast<const T*>(value);
}
const Value* ConvertFromT(const T& value,
Value* scratch_space) const override {
Value* /*scratch_space*/) const override {
return static_cast<const Value*>(&value);
}
};
@ -325,7 +325,7 @@ class RepeatedPtrFieldStringAccessor final
*result = *static_cast<const std::string*>(value);
}
const Value* ConvertFromT(const std::string& value,
Value* scratch_space) const override {
Value* /*scratch_space*/) const override {
return static_cast<const Value*>(&value);
}
};
@ -352,7 +352,7 @@ class RepeatedPtrFieldMessageAccessor final
result->CopyFrom(*static_cast<const Message*>(value));
}
const Value* ConvertFromT(const Message& value,
Value* scratch_space) const override {
Value* /*scratch_space*/) const override {
return static_cast<const Value*>(&value);
}
};

@ -51,7 +51,7 @@ using MakeUnsignedT =
// types.
template <typename T,
typename std::enable_if<std::is_integral<T>::value, int>::type = 0>
bool IsNan(T val) {
bool IsNan(T /*val*/) {
return false;
}

@ -166,7 +166,7 @@ class PROTOBUF_EXPORT StatusOrHelper {
template<typename T>
struct StatusOrHelper::Specialize {
// For non-pointer T, a reference can never be nullptr.
static inline bool IsValueNull(const T& t) { return false; }
static inline bool IsValueNull(const T& /*t*/) { return false; }
};
template<typename T>

@ -1439,8 +1439,8 @@ class TextFormat::Printer::TextGenerator
class TextFormat::Printer::DebugStringFieldValuePrinter
: public TextFormat::FastFieldValuePrinter {
public:
void PrintMessageStart(const Message& message, int field_index,
int field_count, bool single_line_mode,
void PrintMessageStart(const Message& /*message*/, int /*field_index*/,
int /*field_count*/, bool single_line_mode,
BaseTextGenerator* generator) const override {
// This is safe as only TextGenerator is used with
// DebugStringFieldValuePrinter.
@ -1491,7 +1491,7 @@ const Descriptor* TextFormat::Finder::FindAnyType(
}
MessageFactory* TextFormat::Finder::FindExtensionFactory(
const FieldDescriptor* field) const {
const FieldDescriptor* /*field*/) const {
return nullptr;
}
@ -1757,7 +1757,7 @@ void TextFormat::FastFieldValuePrinter::PrintDouble(
generator->PrintString(!std::isnan(val) ? SimpleDtoa(val) : "nan");
}
void TextFormat::FastFieldValuePrinter::PrintEnum(
int32_t val, const std::string& name, BaseTextGenerator* generator) const {
int32_t /*val*/, const std::string& name, BaseTextGenerator* generator) const {
generator->PrintString(name);
}
@ -1772,13 +1772,13 @@ void TextFormat::FastFieldValuePrinter::PrintBytes(
PrintString(val, generator);
}
void TextFormat::FastFieldValuePrinter::PrintFieldName(
const Message& message, int field_index, int field_count,
const Message& message, int /*field_index*/, int /*field_count*/,
const Reflection* reflection, const FieldDescriptor* field,
BaseTextGenerator* generator) const {
PrintFieldName(message, reflection, field, generator);
}
void TextFormat::FastFieldValuePrinter::PrintFieldName(
const Message& message, const Reflection* reflection,
const Message& /*message*/, const Reflection* /*reflection*/,
const FieldDescriptor* field, BaseTextGenerator* generator) const {
if (field->is_extension()) {
generator->PrintLiteral("[");
@ -1792,7 +1792,7 @@ void TextFormat::FastFieldValuePrinter::PrintFieldName(
}
}
void TextFormat::FastFieldValuePrinter::PrintMessageStart(
const Message& message, int field_index, int field_count,
const Message& /*message*/, int /*field_index*/, int /*field_count*/,
bool single_line_mode, BaseTextGenerator* generator) const {
if (single_line_mode) {
generator->PrintLiteral(" { ");
@ -1801,12 +1801,12 @@ void TextFormat::FastFieldValuePrinter::PrintMessageStart(
}
}
bool TextFormat::FastFieldValuePrinter::PrintMessageContent(
const Message& message, int field_index, int field_count,
bool single_line_mode, BaseTextGenerator* generator) const {
const Message& /*message*/, int /*field_index*/, int /*field_count*/,
bool /*single_line_mode*/, BaseTextGenerator* /*generator*/) const {
return false; // Use the default printing function.
}
void TextFormat::FastFieldValuePrinter::PrintMessageEnd(
const Message& message, int field_index, int field_count,
const Message& /*message*/, int /*field_index*/, int /*field_count*/,
bool single_line_mode, BaseTextGenerator* generator) const {
if (single_line_mode) {
generator->PrintLiteral("} ");
@ -1868,7 +1868,7 @@ class FieldValuePrinterWrapper : public TextFormat::FastFieldValuePrinter {
TextFormat::BaseTextGenerator* generator) const override {
generator->PrintString(delegate_->PrintEnum(val, name));
}
void PrintFieldName(const Message& message, int field_index, int field_count,
void PrintFieldName(const Message& message, int /*field_index*/, int /*field_count*/,
const Reflection* reflection,
const FieldDescriptor* field,
TextFormat::BaseTextGenerator* generator) const override {

@ -251,7 +251,7 @@ void UnknownField::Delete() {
}
}
void UnknownField::DeepCopy(const UnknownField& other) {
void UnknownField::DeepCopy(const UnknownField& /*other*/) {
switch (type()) {
case UnknownField::TYPE_LENGTH_DELIMITED:
data_.length_delimited_.string_value =

@ -58,7 +58,7 @@ SimpleFieldComparator::~SimpleFieldComparator() {}
FieldComparator::ComparisonResult SimpleFieldComparator::SimpleCompare(
const Message& message_1, const Message& message_2,
const FieldDescriptor* field, int index_1, int index_2,
const util::FieldContext* field_context) {
const util::FieldContext* /*field_context*/) {
const Reflection* reflection_1 = message_1.GetReflection();
const Reflection* reflection_2 = message_2.GetReflection();
@ -155,7 +155,7 @@ bool SimpleFieldComparator::CompareDouble(const FieldDescriptor& field,
return CompareDoubleOrFloat(field, value_1, value_2);
}
bool SimpleFieldComparator::CompareEnum(const FieldDescriptor& field,
bool SimpleFieldComparator::CompareEnum(const FieldDescriptor& /*field*/,
const EnumValueDescriptor* value_1,
const EnumValueDescriptor* value_2) {
return value_1->number() == value_2->number();

@ -97,7 +97,7 @@ class PROTOBUF_EXPORT DataPiece {
str_(value),
use_strict_base64_decoding_(use_strict_base64_decoding) {}
// Constructor for bytes. The second parameter is not used.
DataPiece(StringPiece value, bool dummy, bool use_strict_base64_decoding)
DataPiece(StringPiece value, bool /*dummy*/, bool use_strict_base64_decoding)
: type_(TYPE_BYTES),
str_(value),
use_strict_base64_decoding_(use_strict_base64_decoding) {}

@ -83,16 +83,16 @@ class PROTOBUF_EXPORT NoopErrorListener : public ErrorListener {
NoopErrorListener() {}
~NoopErrorListener() override {}
void InvalidName(const LocationTrackerInterface& loc,
StringPiece invalid_name,
StringPiece message) override {}
void InvalidName(const LocationTrackerInterface& /*loc*/,
StringPiece /*invalid_name*/,
StringPiece /*message*/) override {}
void InvalidValue(const LocationTrackerInterface& loc,
StringPiece type_name,
StringPiece value) override {}
void InvalidValue(const LocationTrackerInterface& /*loc*/,
StringPiece /*type_name*/,
StringPiece /*value*/) override {}
void MissingField(const LocationTrackerInterface& loc,
StringPiece missing_name) override {}
void MissingField(const LocationTrackerInterface& /*loc*/,
StringPiece /*missing_name*/) override {}
private:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(NoopErrorListener);

@ -863,7 +863,7 @@ bool JsonStreamParser::IsEmptyNullAllowed(TokenType type) {
}
util::Status JsonStreamParser::ReportFailure(StringPiece message,
ParseErrorType parse_code) {
ParseErrorType /*parse_code*/) {
static const int kContextLength = 20;
const char* p_start = p_.data();
const char* json_start = json_.data();

@ -252,7 +252,7 @@ util::StatusOr<uint32_t> ProtoStreamObjectSource::RenderList(
}
util::StatusOr<uint32_t> ProtoStreamObjectSource::RenderMap(
const google::protobuf::Field* field, StringPiece name,
const google::protobuf::Field* field, StringPiece /*name*/,
uint32_t list_tag, ObjectWriter* ow) const {
const google::protobuf::Type* field_type =
typeinfo_->GetTypeByTypeUrl(field->type_url());
@ -375,7 +375,7 @@ util::Status ProtoStreamObjectSource::RenderDuration(
}
util::Status ProtoStreamObjectSource::RenderDouble(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint64_t buffer64 = 0; // default value of Double wrapper value
@ -388,7 +388,7 @@ util::Status ProtoStreamObjectSource::RenderDouble(
}
util::Status ProtoStreamObjectSource::RenderFloat(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint32_t buffer32 = 0; // default value of Float wrapper value
@ -401,7 +401,7 @@ util::Status ProtoStreamObjectSource::RenderFloat(
}
util::Status ProtoStreamObjectSource::RenderInt64(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint64_t buffer64 = 0; // default value of Int64 wrapper value
@ -414,7 +414,7 @@ util::Status ProtoStreamObjectSource::RenderInt64(
}
util::Status ProtoStreamObjectSource::RenderUInt64(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint64_t buffer64 = 0; // default value of UInt64 wrapper value
@ -427,7 +427,7 @@ util::Status ProtoStreamObjectSource::RenderUInt64(
}
util::Status ProtoStreamObjectSource::RenderInt32(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint32_t buffer32 = 0; // default value of Int32 wrapper value
@ -440,7 +440,7 @@ util::Status ProtoStreamObjectSource::RenderInt32(
}
util::Status ProtoStreamObjectSource::RenderUInt32(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint32_t buffer32 = 0; // default value of UInt32 wrapper value
@ -453,7 +453,7 @@ util::Status ProtoStreamObjectSource::RenderUInt32(
}
util::Status ProtoStreamObjectSource::RenderBool(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint64_t buffer64 = 0; // results in 'false' value as default, which is the
@ -467,7 +467,7 @@ util::Status ProtoStreamObjectSource::RenderBool(
}
util::Status ProtoStreamObjectSource::RenderString(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint32_t buffer32;
@ -482,7 +482,7 @@ util::Status ProtoStreamObjectSource::RenderString(
}
util::Status ProtoStreamObjectSource::RenderBytes(
const ProtoStreamObjectSource* os, const google::protobuf::Type& type,
const ProtoStreamObjectSource* os, const google::protobuf::Type& /*type*/,
StringPiece field_name, ObjectWriter* ow) {
uint32_t tag = os->stream_->ReadTag();
uint32_t buffer32;

@ -78,25 +78,25 @@ class NumDiffsReporter : public google::protobuf::util::MessageDifferencer::Repo
// Report that a field has been added into Message2.
void ReportAdded(
const google::protobuf::Message& message1, const google::protobuf::Message& message2,
const google::protobuf::Message& /*message1*/, const google::protobuf::Message& /*message2*/,
const std::vector<google::protobuf::util::MessageDifferencer::SpecificField>&
field_path) override {
/*field_path*/) override {
++num_diffs_;
}
// Report that a field has been deleted from Message1.
void ReportDeleted(
const google::protobuf::Message& message1, const google::protobuf::Message& message2,
const google::protobuf::Message& /*message1*/, const google::protobuf::Message& /*message2*/,
const std::vector<google::protobuf::util::MessageDifferencer::SpecificField>&
field_path) override {
/*field_path*/) override {
++num_diffs_;
}
// Report that the value of a field has been modified.
void ReportModified(
const google::protobuf::Message& message1, const google::protobuf::Message& message2,
const google::protobuf::Message& /*message1*/, const google::protobuf::Message& /*message2*/,
const std::vector<google::protobuf::util::MessageDifferencer::SpecificField>&
field_path) override {
/*field_path*/) override {
++num_diffs_;
}
@ -2104,7 +2104,7 @@ void MessageDifferencer::StreamReporter::PrintMapKey(
}
void MessageDifferencer::StreamReporter::ReportAdded(
const Message& message1, const Message& message2,
const Message& /*message1*/, const Message& message2,
const std::vector<SpecificField>& field_path) {
printer_->Print("added: ");
PrintPath(field_path, false);
@ -2114,7 +2114,7 @@ void MessageDifferencer::StreamReporter::ReportAdded(
}
void MessageDifferencer::StreamReporter::ReportDeleted(
const Message& message1, const Message& message2,
const Message& message1, const Message& /*message2*/,
const std::vector<SpecificField>& field_path) {
printer_->Print("deleted: ");
PrintPath(field_path, true);
@ -2153,7 +2153,7 @@ void MessageDifferencer::StreamReporter::ReportModified(
}
void MessageDifferencer::StreamReporter::ReportMoved(
const Message& message1, const Message& message2,
const Message& message1, const Message& /*message2*/,
const std::vector<SpecificField>& field_path) {
printer_->Print("moved: ");
PrintPath(field_path, true);
@ -2165,7 +2165,7 @@ void MessageDifferencer::StreamReporter::ReportMoved(
}
void MessageDifferencer::StreamReporter::ReportMatched(
const Message& message1, const Message& message2,
const Message& message1, const Message& /*message2*/,
const std::vector<SpecificField>& field_path) {
printer_->Print("matched: ");
PrintPath(field_path, true);
@ -2179,7 +2179,7 @@ void MessageDifferencer::StreamReporter::ReportMatched(
}
void MessageDifferencer::StreamReporter::ReportIgnored(
const Message& message1, const Message& message2,
const Message& /*message1*/, const Message& /*message2*/,
const std::vector<SpecificField>& field_path) {
printer_->Print("ignored: ");
PrintPath(field_path, true);
@ -2197,7 +2197,7 @@ void MessageDifferencer::StreamReporter::SetMessages(const Message& message1,
}
void MessageDifferencer::StreamReporter::ReportUnknownFieldIgnored(
const Message& message1, const Message& message2,
const Message& /*message1*/, const Message& /*message2*/,
const std::vector<SpecificField>& field_path) {
printer_->Print("ignored: ");
PrintPath(field_path, true);

@ -528,7 +528,7 @@ void WireFormatLite::WriteMessage(int field_number, const MessageLite& value,
}
void WireFormatLite::WriteSubMessageMaybeToArray(
int size, const MessageLite& value, io::CodedOutputStream* output) {
int /*size*/, const MessageLite& value, io::CodedOutputStream* output) {
output->SetCur(value._InternalSerialize(output->Cur(), output->EpsCopy()));
}
@ -571,7 +571,7 @@ bool WireFormatLite::ReadBytes(io::CodedInputStream* input, std::string** p) {
}
void PrintUTF8ErrorLog(const char* field_name, const char* operation_str,
bool emit_stacktrace) {
bool /*emit_stacktrace*/) {
std::string stacktrace;
std::string quoted_field_name = "";
if (field_name != nullptr) {

Loading…
Cancel
Save