From eaf2d9188a9c4aac4b199343d0922513847c20c7 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 2 May 2022 09:27:45 +0200 Subject: [PATCH] Tweak for Coverity 1488422. The spot where the warning happens changed, plus appease clang-tidy. --- pdns/signingpipe.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/signingpipe.cc b/pdns/signingpipe.cc index 30bd41a812..0198686d5c 100644 --- a/pdns/signingpipe.cc +++ b/pdns/signingpipe.cc @@ -201,13 +201,13 @@ void ChunkedSigningPipe::sendRRSetToWorker() // it sounds so socialist! shuffle(rwVect.second.begin(), rwVect.second.end(), pdns::dns_random_engine()); // pick random available worker auto ptr = d_rrsetToSign.get(); writen2(*rwVect.second.begin(), &ptr, sizeof(ptr)); - d_rrsetToSign.release(); + // coverity[leaked_storage] + static_cast(d_rrsetToSign.release()); d_rrsetToSign = make_unique(); d_outstandings[*rwVect.second.begin()]++; d_outstanding++; d_queued++; wantWrite=false; - // coverity[leaked_storage] } if(wantRead) { @@ -252,12 +252,12 @@ void ChunkedSigningPipe::sendRRSetToWorker() // it sounds so socialist! shuffle(rwVect.second.begin(), rwVect.second.end(), pdns::dns_random_engine()); // pick random available worker auto ptr = d_rrsetToSign.get(); writen2(*rwVect.second.begin(), &ptr, sizeof(ptr)); - d_rrsetToSign.release(); + // coverity[leaked_storage] + static_cast(d_rrsetToSign.release()); d_rrsetToSign = make_unique(); d_outstandings[*rwVect.second.begin()]++; d_outstanding++; d_queued++; - // coverity[leaked_storage] } } -- 2.47.2