diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc index 7483a6692c8..3a0a600f6cc 100644 --- a/src/cpp/server/health/default_health_check_service.cc +++ b/src/cpp/server/health/default_health_check_service.cc @@ -182,8 +182,7 @@ void DefaultHealthCheckService::HealthCheckServiceImpl::StartServingThread() { } void DefaultHealthCheckService::HealthCheckServiceImpl::Serve(void* arg) { - HealthCheckServiceImpl* service = - reinterpret_cast(arg); + HealthCheckServiceImpl* service = static_cast(arg); void* tag; bool ok; while (true) { diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc index 9eaab5d6366..5feac238b1f 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.cc @@ -85,7 +85,7 @@ void LoadReporterAsyncServiceImpl::FetchAndSample(bool ok) { void LoadReporterAsyncServiceImpl::Work(void* arg) { LoadReporterAsyncServiceImpl* service = - reinterpret_cast(arg); + static_cast(arg); service->FetchAndSample(true /* ok */); // TODO(juanlishen): This is a workaround to wait for the cq to be ready. Need // to figure out why cq is not ready after service starts.