From: Aki Tuomi Date: Sat, 19 Oct 2019 14:45:18 +0000 (+0300) Subject: nsecrecords.cc: Fix shadowing variables X-Git-Tag: dnsdist-1.4.0~15^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0a95f5c7835f64e3899b2437f39934369ec0f3;p=thirdparty%2Fpdns.git nsecrecords.cc: Fix shadowing variables nsecrecords.cc:79:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow] nsecrecords.cc:141:12: warning: declaration of ‘count’ shadows a member of 'this' [-Wshadow] --- diff --git a/pdns/nsecrecords.cc b/pdns/nsecrecords.cc index 21e6d13da1..dc97e3bf48 100644 --- a/pdns/nsecrecords.cc +++ b/pdns/nsecrecords.cc @@ -76,9 +76,9 @@ void NSECBitmap::toPacket(DNSPacketWriter& pw) { NSECBitmapGenerator nbg(pw); if (d_bitset) { - size_t count = d_bitset->count(); size_t found = 0; - for(size_t idx = 0; idx < nbTypes && found < count; ++idx){ + size_t l_count = d_bitset->count(); + for(size_t idx = 0; idx < nbTypes && found < l_count; ++idx){ if (!d_bitset->test(idx)) { continue; } @@ -138,9 +138,9 @@ string NSECBitmap::getZoneRepresentation() const string ret; if (d_bitset) { - size_t count = d_bitset->count(); size_t found = 0; - for(size_t idx = 0; idx < nbTypes && found < count; ++idx) { + size_t l_count = d_bitset->count(); + for(size_t idx = 0; idx < nbTypes && found < l_count; ++idx) { if (!d_bitset->test(idx)) { continue; }