diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index ebe3660619b..05c6b095d8e 100644 --- a/src/compiler/python_plugin.cc +++ b/src/compiler/python_plugin.cc @@ -63,7 +63,7 @@ class PythonGrpcGenerator : public CodeGenerator { // Get output file name. string file_name; static const int proto_suffix_length = 6; // length of ".proto" - if (file->name().size() > proto_suffix_length && + if (file->name().size() > static_cast(proto_suffix_length) && file->name().find_last_of(".proto") == file->name().size() - 1) { file_name = file->name().substr( 0, file->name().size() - proto_suffix_length) + "_pb2.py"; diff --git a/test/cpp/qps/client.cc b/test/cpp/qps/client.cc index 666f25054ab..11c39eb4f52 100644 --- a/test/cpp/qps/client.cc +++ b/test/cpp/qps/client.cc @@ -127,7 +127,7 @@ void RunTest(const int client_threads, const int client_channels, } std::vector threads; // Will add threads when ready to execute - std::vector<::gpr_histogram *> thread_stats(client_threads); + std::vector< ::gpr_histogram *> thread_stats(client_threads); TestService::Stub *stub_stats = channels[0].get_stub(); grpc::ClientContext context_stats_begin;