aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/text_format_unittest.cc
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2018-06-28 13:48:06 -0700
committerGravatar GitHub <noreply@github.com>2018-06-28 13:48:06 -0700
commitf25e7edfa40c12300cf7dd3837b82841d095a79a (patch)
tree40ed1cec0eb61aa8f2c1b98a4b324453de9f6ed5 /src/google/protobuf/text_format_unittest.cc
parent70544627cb89a61652d688c53984c68013ab985e (diff)
Add -Og to no-warning-test (#4830)
* Add -Og to no-warning-test * Initialize value * Implement PrintFieldName in CompactRepeatedFieldPrinter to prevent Woverloaded-virtual * Update generated code
Diffstat (limited to 'src/google/protobuf/text_format_unittest.cc')
-rw-r--r--src/google/protobuf/text_format_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/text_format_unittest.cc b/src/google/protobuf/text_format_unittest.cc
index 544c37e2..53184130 100644
--- a/src/google/protobuf/text_format_unittest.cc
+++ b/src/google/protobuf/text_format_unittest.cc
@@ -574,6 +574,11 @@ class CompactRepeatedFieldPrinter : public TextFormat::FastFieldValuePrinter {
generator->PrintString(field->name());
}
}
+ // To prevent compiler complaining about Woverloaded-virtual
+ void PrintFieldName(const Message& message,
+ const Reflection* reflection,
+ const FieldDescriptor* field,
+ TextFormat::BaseTextGenerator* generator) const override {}
void PrintMessageStart(
const Message& message, int field_index, int field_count,
bool single_line_mode,