aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
committerGravatar Noah Eisen <ncteisen@google.com>2018-02-09 09:16:55 -0800
commitbe82e64b3debcdb1d9ec6a149fc85af0d46bfb7e (patch)
treecc5e1234073eb250a2c319b5a4db2919fce060ea /test/cpp/qps
parent194436342137924b4fb7429bede037a4b5ec7edb (diff)
Autofix c casts to c++ casts
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/report.cc6
-rw-r--r--test/cpp/qps/server.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc
index 42ebeff41d..863be40f2a 100644
--- a/test/cpp/qps/report.cc
+++ b/test/cpp/qps/report.cc
@@ -109,9 +109,9 @@ void GprLogReporter::ReportCoreStats(const char* name, int idx,
for (int i = 0; i < GRPC_STATS_HISTOGRAM_COUNT; i++) {
gpr_log(GPR_DEBUG, "%s[%d].%s = %.1lf/%.1lf/%.1lf (50/95/99%%-ile)", name,
idx, grpc_stats_histogram_name[i],
- grpc_stats_histo_percentile(&data, (grpc_stats_histograms)i, 50),
- grpc_stats_histo_percentile(&data, (grpc_stats_histograms)i, 95),
- grpc_stats_histo_percentile(&data, (grpc_stats_histograms)i, 99));
+ grpc_stats_histo_percentile(&data, static_cast<grpc_stats_histograms>(i), 50),
+ grpc_stats_histo_percentile(&data, static_cast<grpc_stats_histograms>(i), 95),
+ grpc_stats_histo_percentile(&data, static_cast<grpc_stats_histograms>(i), 99));
}
}
diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h
index 9da33566dd..d772e709de 100644
--- a/test/cpp/qps/server.h
+++ b/test/cpp/qps/server.h
@@ -84,7 +84,7 @@ class Server {
}
payload->set_type(type);
// Don't waste time creating a new payload of identical size.
- if (payload->body().length() != (size_t)size) {
+ if (payload->body().length() != static_cast<size_t>(size)) {
std::unique_ptr<char[]> body(new char[size]());
payload->set_body(body.get(), size);
}