From be82e64b3debcdb1d9ec6a149fc85af0d46bfb7e Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Fri, 9 Feb 2018 09:16:55 -0800 Subject: Autofix c casts to c++ casts --- test/core/util/test_config.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/core/util/test_config.cc') diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index e381be6842..5c01cfd070 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -36,7 +36,7 @@ int64_t g_poller_slowdown_factor = 1; #if GPR_GETPID_IN_UNISTD_H #include -static unsigned seed(void) { return (unsigned)getpid(); } +static unsigned seed(void) { return static_cast(getpid()); } #endif #if GPR_GETPID_IN_PROCESS_H @@ -264,7 +264,7 @@ static void install_crash_handler() { ss.ss_size = sizeof(g_alt_stack); ss.ss_sp = g_alt_stack; GPR_ASSERT(sigaltstack(&ss, nullptr) == 0); - sa.sa_flags = (int)(SA_SIGINFO | SA_ONSTACK | SA_RESETHAND); + sa.sa_flags = static_cast(SA_SIGINFO | SA_ONSTACK | SA_RESETHAND); sa.sa_sigaction = crash_handler; GPR_ASSERT(sigaction(SIGILL, &sa, nullptr) == 0); GPR_ASSERT(sigaction(SIGABRT, &sa, nullptr) == 0); @@ -365,14 +365,14 @@ int64_t grpc_test_slowdown_factor() { gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s) { return gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_millis(grpc_test_slowdown_factor() * (int64_t)1e3 * time_s, + gpr_time_from_millis(grpc_test_slowdown_factor() * static_cast(1e3) * time_s, GPR_TIMESPAN)); } gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms) { return gpr_time_add( gpr_now(GPR_CLOCK_MONOTONIC), - gpr_time_from_micros(grpc_test_slowdown_factor() * (int64_t)1e3 * time_ms, + gpr_time_from_micros(grpc_test_slowdown_factor() * static_cast(1e3) * time_ms, GPR_TIMESPAN)); } -- cgit v1.2.3