aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/cpp_generator.cc')
-rw-r--r--src/compiler/cpp_generator.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index b0d2b5d229..6cd615019b 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -849,9 +849,12 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
"::grpc::Status $ns$$Service$::Service::$Method$("
"::grpc::ServerContext* context, "
"const $Request$* request, $Response$* response) {\n");
+ printer->Print(" (void) context;\n");
+ printer->Print(" (void) request;\n");
+ printer->Print(" (void) response;\n");
printer->Print(
" return ::grpc::Status("
- "::grpc::StatusCode::UNIMPLEMENTED);\n");
+ "::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (ClientOnlyStreaming(method)) {
printer->Print(*vars,
@@ -859,9 +862,12 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
"::grpc::ServerContext* context, "
"::grpc::ServerReader< $Request$>* reader, "
"$Response$* response) {\n");
+ printer->Print(" (void) context;\n");
+ printer->Print(" (void) reader;\n");
+ printer->Print(" (void) response;\n");
printer->Print(
" return ::grpc::Status("
- "::grpc::StatusCode::UNIMPLEMENTED);\n");
+ "::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (ServerOnlyStreaming(method)) {
printer->Print(*vars,
@@ -869,9 +875,12 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
"::grpc::ServerContext* context, "
"const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) {\n");
+ printer->Print(" (void) context;\n");
+ printer->Print(" (void) request;\n");
+ printer->Print(" (void) writer;\n");
printer->Print(
" return ::grpc::Status("
- "::grpc::StatusCode::UNIMPLEMENTED);\n");
+ "::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
} else if (BidiStreaming(method)) {
printer->Print(*vars,
@@ -879,9 +888,11 @@ void PrintSourceServerMethod(grpc::protobuf::io::Printer *printer,
"::grpc::ServerContext* context, "
"::grpc::ServerReaderWriter< $Response$, $Request$>* "
"stream) {\n");
+ printer->Print(" (void) context;\n");
+ printer->Print(" (void) stream;\n");
printer->Print(
" return ::grpc::Status("
- "::grpc::StatusCode::UNIMPLEMENTED);\n");
+ "::grpc::StatusCode::UNIMPLEMENTED, \"\");\n");
printer->Print("}\n\n");
}
}