Skip to content
Snippets Groups Projects
Commit e39cb740 authored by yang-g's avatar yang-g
Browse files

Add a dummy reference to prevent unused variable warning if there is no rpc method defined.

parent 9c7961a0
No related branches found
No related tags found
No related merge requests found
......@@ -1106,6 +1106,7 @@ void PrintSourceService(grpc::protobuf::io::Printer *printer,
printer->Print(*vars, "$ns$$Service$::Service::Service() {\n");
printer->Indent();
printer->Print(*vars, "(void)$prefix$$Service$_method_names;\n");
for (int i = 0; i < service->method_count(); ++i) {
const grpc::protobuf::MethodDescriptor *method = service->method(i);
(*vars)["Idx"] = as_string(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment