diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc
index 088fc6bc13dacb1b737ab5f69b0f0b19f2fe7c91..1139dfc89bc23ffab0f18cd8f4a2e532ae21eeee 100644
--- a/src/compiler/cpp_generator.cc
+++ b/src/compiler/cpp_generator.cc
@@ -609,7 +609,7 @@ void PrintSourceService(google::protobuf::io::Printer *printer,
       "  std::unique_ptr< $Service$::Stub> stub(new $Service$::Stub());\n"
       "  stub->set_channel(channel);\n"
       "  return stub;\n"
-      "};\n\n");
+      "}\n\n");
   for (int i = 0; i < service->method_count(); ++i) {
     (*vars)["Idx"] = as_string(i);
     PrintSourceClientMethod(printer, service->method(i), vars);