Merge pull request #21793 from grpc/vjpai-patch-2

Weaken reinterpret_cast to static_cast
pull/21796/head
Vijay Pai 5 years ago committed by GitHub
commit d4e5e535c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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