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) { void DefaultHealthCheckService::HealthCheckServiceImpl::Serve(void* arg) {
HealthCheckServiceImpl* service = HealthCheckServiceImpl* service = static_cast<HealthCheckServiceImpl*>(arg);
reinterpret_cast<HealthCheckServiceImpl*>(arg);
void* tag; void* tag;
bool ok; bool ok;
while (true) { while (true) {

@ -85,7 +85,7 @@ void LoadReporterAsyncServiceImpl::FetchAndSample(bool ok) {
void LoadReporterAsyncServiceImpl::Work(void* arg) { void LoadReporterAsyncServiceImpl::Work(void* arg) {
LoadReporterAsyncServiceImpl* service = LoadReporterAsyncServiceImpl* service =
reinterpret_cast<LoadReporterAsyncServiceImpl*>(arg); static_cast<LoadReporterAsyncServiceImpl*>(arg);
service->FetchAndSample(true /* ok */); service->FetchAndSample(true /* ok */);
// TODO(juanlishen): This is a workaround to wait for the cq to be ready. Need // 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. // to figure out why cq is not ready after service starts.

Loading…
Cancel
Save