From: Y7n05h Date: Thu, 12 May 2022 02:44:22 +0000 (+0800) Subject: dnsdist: remove implicit type conversion (fix: #11619 ) X-Git-Tag: auth-4.8.0-alpha0~101^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11620%2Fhead;p=thirdparty%2Fpdns.git dnsdist: remove implicit type conversion (fix: #11619 ) Signed-off-by: Y7n05h --- diff --git a/pdns/dnsdist-lua-inspection.cc b/pdns/dnsdist-lua-inspection.cc index 112172ce9b..a641b0fb8a 100644 --- a/pdns/dnsdist-lua-inspection.cc +++ b/pdns/dnsdist-lua-inspection.cc @@ -72,10 +72,10 @@ static LuaArray>> getGenResponses(uint LuaArray>> ret; ret.reserve(std::min(rcounts.size(), static_cast(top + 1U))); - uint64_t count = 1; + int count = 1; unsigned int rest = 0; for (const auto& rc : rcounts) { - if (count == top+1) { + if (count == static_cast(top + 1)) { rest+=rc.first; } else { diff --git a/pdns/dnsdist-rings.cc b/pdns/dnsdist-rings.cc index 6b044273a4..fabbd4d043 100644 --- a/pdns/dnsdist-rings.cc +++ b/pdns/dnsdist-rings.cc @@ -111,9 +111,9 @@ std::unordered_map>> Rings::getTopBand }); std::unordered_map>> ret; uint64_t rest = 0; - unsigned int count = 1; + int count = 1; for(const auto& rc : rcounts) { - if(count==numentries+1) { + if (count == static_cast(numentries + 1)) { rest+=rc.first; } else {