diff options
author | 2018-02-10 08:58:46 -0800 | |
---|---|---|
committer | 2018-02-10 08:58:46 -0800 | |
commit | 10a9e4e4fb5fb6aaacf2d02f10dc7690b98197e7 (patch) | |
tree | ad77e09e79127aaf26911001f884b7ca8c92edc7 /test/core/gpr/cpu_test.cc | |
parent | 2650c9730f6b6288a57c5126f629f1e42c2a282c (diff) | |
parent | e1bec40dfb8ff7562fc6a6dafb6d0369294e852f (diff) |
Merge pull request #14150 from ncteisen/more-clang-tidy
Remove and Prohibit C Style Casts
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); |