From 5cd7bc186c48fadde3131f3afe7036fc27030083 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 4 Feb 2021 13:57:35 -0800 Subject: [PATCH] Fix unused variable 'weak_refs' --- src/core/lib/gprpp/dual_ref_counted.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/gprpp/dual_ref_counted.h b/src/core/lib/gprpp/dual_ref_counted.h index 91469eaf051..57ee1a9fe09 100644 --- a/src/core/lib/gprpp/dual_ref_counted.h +++ b/src/core/lib/gprpp/dual_ref_counted.h @@ -170,8 +170,8 @@ class DualRefCounted : public Orphanable { #endif const uint64_t prev_ref_pair = refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); - const uint32_t weak_refs = GetWeakRefs(prev_ref_pair); #ifndef NDEBUG + const uint32_t weak_refs = GetWeakRefs(prev_ref_pair); const uint32_t strong_refs = GetStrongRefs(prev_ref_pair); if (trace != nullptr) { gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this, @@ -192,8 +192,8 @@ class DualRefCounted : public Orphanable { #endif const uint64_t prev_ref_pair = refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); - const uint32_t weak_refs = GetWeakRefs(prev_ref_pair); #ifndef NDEBUG + const uint32_t weak_refs = GetWeakRefs(prev_ref_pair); const uint32_t strong_refs = GetStrongRefs(prev_ref_pair); if (trace_ != nullptr) { gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s", trace,