From f25eab6bc9b4195c853f0bd04f1b28a3cd4da1d1 Mon Sep 17 00:00:00 2001 From: Esun Kim <veblush@google.com> Date: Thu, 28 Jan 2021 09:51:10 -0800 Subject: [PATCH 1/2] Enabled missing-field-initializers --- bazel/copts.bzl | 1 - 1 file changed, 1 deletion(-) diff --git a/bazel/copts.bzl b/bazel/copts.bzl index 3d86c1f038a..91f0bc82243 100644 --- a/bazel/copts.bzl +++ b/bazel/copts.bzl @@ -43,7 +43,6 @@ GRPC_LLVM_WARNING_FLAGS = [ "-Wvla", # Exceptions but will be removed "-Wno-deprecated-declarations", - "-Wno-missing-field-initializers", "-Wno-unused-function", ] From 817c54316609de44099d5c4768251c7849ad67cf Mon Sep 17 00:00:00 2001 From: Esun Kim <veblush@google.com> Date: Thu, 28 Jan 2021 10:05:04 -0800 Subject: [PATCH 2/2] Fix missing-field-initializers --- src/core/ext/xds/xds_client_stats.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ext/xds/xds_client_stats.cc b/src/core/ext/xds/xds_client_stats.cc index de401a7b290..c38ded23bc0 100644 --- a/src/core/ext/xds/xds_client_stats.cc +++ b/src/core/ext/xds/xds_client_stats.cc @@ -137,7 +137,8 @@ XdsClusterLocalityStats::GetSnapshotAndReset() { // not related to a single reporting interval. total_requests_in_progress_.Load(MemoryOrder::RELAXED), GetAndResetCounter(&total_error_requests_), - GetAndResetCounter(&total_issued_requests_)}; + GetAndResetCounter(&total_issued_requests_), + {}}; MutexLock lock(&backend_metrics_mu_); snapshot.backend_metrics = std::move(backend_metrics_); return snapshot;