diff options
Diffstat (limited to 'test/core/gpr/cpu_test.cc')
-rw-r--r-- | test/core/gpr/cpu_test.cc | 4 |
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); |