aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/gpr/cpu_test.cc
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/core/gpr/cpu_test.cc
parent194436342137924b4fb7429bede037a4b5ec7edb (diff)
Autofix c casts to c++ casts
Diffstat (limited to 'test/core/gpr/cpu_test.cc')
-rw-r--r--test/core/gpr/cpu_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/gpr/cpu_test.cc b/test/core/gpr/cpu_test.cc
index 87cdc0fb50..46a168665c 100644
--- a/test/core/gpr/cpu_test.cc
+++ b/test/core/gpr/cpu_test.cc
@@ -62,7 +62,7 @@ struct cpu_test {
};
static void worker_thread(void* arg) {
- struct cpu_test* ct = (struct cpu_test*)arg;
+ struct cpu_test* ct = static_cast<struct cpu_test*>(arg);
uint32_t cpu;
unsigned r = 12345678;
unsigned i, j;
@@ -103,7 +103,7 @@ static void cpu_test(void) {
gpr_thd_id thd;
ct.ncores = gpr_cpu_num_cores();
GPR_ASSERT(ct.ncores > 0);
- ct.nthreads = (int)ct.ncores * 3;
+ ct.nthreads = static_cast<int>(ct.ncores) * 3;
ct.used = static_cast<int*>(gpr_malloc(ct.ncores * sizeof(int)));
memset(ct.used, 0, ct.ncores * sizeof(int));
gpr_mu_init(&ct.mu);