From: Otto Moerbeek Date: Thu, 7 Jul 2022 10:42:33 +0000 (+0200) Subject: Uninited vars, seen by compiling on jammy X-Git-Tag: auth-4.8.0-alpha0~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11769%2Fhead;p=thirdparty%2Fpdns.git Uninited vars, seen by compiling on jammy --- diff --git a/pdns/lwres.cc b/pdns/lwres.cc index c8f2ce2c0d..2a56b3c84e 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -291,6 +291,7 @@ static LWResult::Result tcpsendrecv(const ComboAddress& ip, TCPOutConnectionMana uint16_t tlen = htons(vpacket.size()); const char *lenP = reinterpret_cast(&tlen); + len = 0; // in case of error localip.sin4.sin_family = ip.sin4.sin_family; if (getsockname(connection.d_handler->getDescriptor(), reinterpret_cast(&localip), &slen) != 0) { return LWResult::Result::PermanentError; diff --git a/pdns/recursordist/test-mtasker.cc b/pdns/recursordist/test-mtasker.cc index 4c71f8240e..6df5fc181c 100644 --- a/pdns/recursordist/test-mtasker.cc +++ b/pdns/recursordist/test-mtasker.cc @@ -51,6 +51,7 @@ BOOST_AUTO_TEST_CASE(test_MtaskerException) MTasker<> mt; mt.makeThread(willThrow, 0); struct timeval now; + now.tv_sec = now.tv_usec = 0; for (;;) { mt.schedule(&now); diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 0ec7e29adc..53fa78d91b 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -5331,7 +5331,7 @@ bool SyncRes::processAnswer(unsigned int depth, LWResult& lwr, const DNSName& qn bool needWildcardProof = false; bool gatherWildcardProof = false; - unsigned int wildcardLabelsCount; + unsigned int wildcardLabelsCount = 0; *rcode = updateCacheFromRecords(depth, lwr, qname, qtype, auth, wasForwarded, ednsmask, state, needWildcardProof, gatherWildcardProof, wildcardLabelsCount, sendRDQuery, remoteIP); if (*rcode != RCode::NoError) { return true;