Fix -Wunused-parameter in map<string, int> fields (fixes #8494) (#8500)

* Fix -Wunused-parameter in map<string, int> fields

* Fix tabs
pull/8510/head
Yuriy Chernyshov 4 years ago committed by GitHub
parent 8babb3bae7
commit 0f25590028
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/google/protobuf/compiler/cpp/cpp_map_field.cc

@ -229,7 +229,10 @@ void MapFieldGenerator::GenerateSerializeWithCachedSizesToArray(
if (utf8_check) {
format(
"struct Utf8Check {\n"
" static void Check(ConstPtr p) {\n");
" static void Check(ConstPtr p) {\n"
// p may be unused when GetUtf8CheckMode evaluates to kNone,
// thus disabling the validation.
" (void)p;\n");
format.Indent();
format.Indent();
if (string_key) {

Loading…
Cancel
Save