]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Uninited vars, seen by compiling on jammy 11769/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 7 Jul 2022 10:42:33 +0000 (12:42 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 7 Jul 2022 10:42:33 +0000 (12:42 +0200)
pdns/lwres.cc
pdns/recursordist/test-mtasker.cc
pdns/syncres.cc

index c8f2ce2c0de7f7a41c6b2edbe85a043c7422f90b..2a56b3c84e0231b54b1a4c1884f661ae9ff340ea 100644 (file)
@@ -291,6 +291,7 @@ static LWResult::Result tcpsendrecv(const ComboAddress& ip, TCPOutConnectionMana
   uint16_t tlen = htons(vpacket.size());
   const char *lenP = reinterpret_cast<const char*>(&tlen);
 
+  len = 0; // in case of error
   localip.sin4.sin_family = ip.sin4.sin_family;
   if (getsockname(connection.d_handler->getDescriptor(), reinterpret_cast<sockaddr*>(&localip), &slen) != 0) {
     return LWResult::Result::PermanentError;
index 4c71f8240e74cc099fd7650b7309fcd27a66f9d1..6df5fc181cab5ac2e58b49ccffd1b267ad1a9f42 100644 (file)
@@ -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);
index 0ec7e29adc2e48d4e77fd030feccd06b5d22f434..53fa78d91b9f2110bd08f2e3f255cc99405a9c3e 100644 (file)
@@ -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;