From: Miod Vallat Date: Thu, 26 Jun 2025 09:04:56 +0000 (+0200) Subject: Try to make clang-tidy less unhappy. Yawn. X-Git-Tag: rec-5.3.0-alpha2~40^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8af83d7b3f2a3f517847116dd48c9d23555e6562;p=thirdparty%2Fpdns.git Try to make clang-tidy less unhappy. Yawn. Signed-off-by: Miod Vallat --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index 7ac2b77316..3afad0fcfa 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -473,8 +473,8 @@ int DNSName::slowCanonCompare_three_way(const DNSName& rhs) const auto iter2 = rhsLabels.rbegin(); const auto& last2 = rhsLabels.rend(); while (iter1 != last1 && iter2 != last2) { - if (int rc = pdns_ilexicographical_compare_three_way(*iter1, *iter2); rc != 0) { - return rc; + if (int res = pdns_ilexicographical_compare_three_way(*iter1, *iter2); res != 0) { + return res; } ++iter1; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) ++iter2; // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) @@ -500,15 +500,21 @@ int DNSName::canonCompare_three_way(const DNSName& rhs) const // 0,2,6,a // 0,4,a - uint8_t ourpos[64], rhspos[64]; - uint8_t ourcount=0, rhscount=0; + std::array ourpos{}; + std::array rhspos{}; + uint8_t ourcount=0; + uint8_t rhscount=0; //cout<<"Asked to compare "<