Weaken reinterpret_cast to static_cast

pull/21793/head
Vijay Pai 5 years ago
parent 25d6f5f18f
commit b7239efc82
  1. 3
      src/cpp/server/health/default_health_check_service.cc
  2. 2
      src/cpp/server/load_reporter/load_reporter_async_service_impl.cc

@ -182,8 +182,7 @@ void DefaultHealthCheckService::HealthCheckServiceImpl::StartServingThread() {
}
void DefaultHealthCheckService::HealthCheckServiceImpl::Serve(void* arg) {
HealthCheckServiceImpl* service =
reinterpret_cast<HealthCheckServiceImpl*>(arg);
HealthCheckServiceImpl* service = static_cast<HealthCheckServiceImpl*>(arg);
void* tag;
bool ok;
while (true) {

@ -85,7 +85,7 @@ void LoadReporterAsyncServiceImpl::FetchAndSample(bool ok) {
void LoadReporterAsyncServiceImpl::Work(void* arg) {
LoadReporterAsyncServiceImpl* service =
reinterpret_cast<LoadReporterAsyncServiceImpl*>(arg);
static_cast<LoadReporterAsyncServiceImpl*>(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.

Loading…
Cancel
Save