Fix unused variable 'weak_refs'

pull/25354/head
Esun Kim 4 years ago
parent 470c0472c2
commit 5cd7bc186c
  1. 4
      src/core/lib/gprpp/dual_ref_counted.h

@ -170,8 +170,8 @@ class DualRefCounted : public Orphanable {
#endif #endif
const uint64_t prev_ref_pair = const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG #ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair); const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
if (trace != nullptr) { if (trace != nullptr) {
gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this, gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this,
@ -192,8 +192,8 @@ class DualRefCounted : public Orphanable {
#endif #endif
const uint64_t prev_ref_pair = const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL); refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG #ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair); const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
if (trace_ != nullptr) { if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s", trace, gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s", trace,

Loading…
Cancel
Save