From e2ecb4401685f0c043010ce921bebf72c7bed5c8 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 16 Aug 2023 11:46:03 +0200 Subject: [PATCH] dnsbulktest: Fix warnings from clang-tidy --- pdns/dnsbulktest.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: "<