diff options
author | Khing <khingblue@gmail.com> | 2016-09-07 11:34:03 +1000 |
---|---|---|
committer | Khing <khingblue@gmail.com> | 2016-09-08 10:56:21 +1000 |
commit | 08b1c718e437041bfe0e6a28611621896e4fe904 (patch) | |
tree | 80b9c7484cf988c5be7466e2c030a8d16a5e9f74 /src/google/protobuf/compiler | |
parent | 30e55aecc19b5e759a4fcd4b7a2a75be66bf3a8d (diff) | |
download | protobuf-08b1c718e437041bfe0e6a28611621896e4fe904.tar.gz protobuf-08b1c718e437041bfe0e6a28611621896e4fe904.tar.bz2 protobuf-08b1c718e437041bfe0e6a28611621896e4fe904.zip |
Fix #2032 unused parameter 'deterministic'
Parameter deterministic is unused in
InternalSerializeWithCachedSizesToArray(), which generates unused
parameter warning in every message.
Diffstat (limited to 'src/google/protobuf/compiler')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message.cc | 1 | ||||
-rw-r--r-- | src/google/protobuf/compiler/plugin.pb.cc | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index 405a5fed..aa00962e 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -3363,6 +3363,7 @@ GenerateSerializeWithCachedSizesToArray(io::Printer* printer) { "classname", classname_); printer->Indent(); + printer->Print("(void)deterministic; // Unused\n"); printer->Print( "// @@protoc_insertion_point(serialize_to_array_start:$full_name$)\n", "full_name", descriptor_->full_name()); diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc index 9064c382..5247f9a2 100644 --- a/src/google/protobuf/compiler/plugin.pb.cc +++ b/src/google/protobuf/compiler/plugin.pb.cc @@ -368,6 +368,7 @@ void CodeGeneratorRequest::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorRequest) // repeated string file_to_generate = 1; for (int i = 0; i < this->file_to_generate_size(); i++) { @@ -877,6 +878,7 @@ void CodeGeneratorResponse_File::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorResponse_File::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse.File) // optional string name = 1; if (has_name()) { @@ -1211,6 +1213,7 @@ void CodeGeneratorResponse::SerializeWithCachedSizes( ::google::protobuf::uint8* CodeGeneratorResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.compiler.CodeGeneratorResponse) // optional string error = 1; if (has_error()) { |