From: Remi Gacogne Date: Wed, 16 Aug 2023 09:46:03 +0000 (+0200) Subject: dnsbulktest: Fix warnings from clang-tidy X-Git-Tag: rec-5.0.0-alpha1~55^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13141%2Fhead;p=thirdparty%2Fpdns.git dnsbulktest: Fix warnings from clang-tidy --- diff --git a/pdns/dnsbulktest.cc b/pdns/dnsbulktest.cc index b6fbc7bcbf..085a644d57 100644 --- a/pdns/dnsbulktest.cc +++ b/pdns/dnsbulktest.cc @@ -136,6 +136,7 @@ struct SendReceive bool receive(Identifier& id, DNSResult& dr) { if (waitForData(d_socket.getHandle(), 0, 500000) > 0) { + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init): no need to initialize the buffer std::array buf; auto len = recv(d_socket.getHandle(), buf.data(), buf.size(), 0); @@ -352,7 +353,7 @@ try boost::format statfmt("Time < %6.03f ms %|30t|%6.03f%% cumulative\n"); for (unsigned int i = 0; i < SendReceive::s_probs.size(); ++i) { - cerr << statfmt % extended_p_square(*sr.d_acc)[i] % (100*SendReceive::s_probs[i]); + cerr << statfmt % extended_p_square(*sr.d_acc)[i] % (100*SendReceive::s_probs.at(i)); } if (g_envoutput) { @@ -373,9 +374,9 @@ try catch (const PDNSException& exp) { cerr<<"Fatal error: "<