diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index ebe3660619b42b546e3ca7d81d39805f65f3922e..05c6b095d8e2916985cb9c2c6d791e8cdeb98a8e 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<size_t>(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 666f25054ab608ec521f7b6a99c074e7fa757641..11c39eb4f52619a9695c1dedc391cf196b8219fa 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<std::thread> 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;