From bfa058597792ee8e37aedd818962f1e473b50a68 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 24 Nov 2021 15:20:55 +0100 Subject: [PATCH] dnsdist: Fix g++/LTO warning about uninitialized dnsheaders in the unit test --- pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc b/pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc index 58593ccbe5..61b5ffb3ec 100644 --- a/pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc +++ b/pdns/dnsdistdist/test-dnsdistdynblocks_hh.cc @@ -447,6 +447,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_QueryRate_responses) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_QTypeRate) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.2"); @@ -534,6 +535,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_QTypeRate) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_RCodeRate) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.2"); @@ -626,6 +628,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_RCodeRate) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_RCodeRatio) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.2"); @@ -744,6 +747,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_RCodeRatio) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_ResponseByteRate) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.2"); @@ -817,6 +821,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_ResponseByteRate) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_Warning) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.2"); @@ -976,6 +981,7 @@ BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_Warning) { BOOST_AUTO_TEST_CASE(test_DynBlockRulesGroup_Ranges) { dnsheader dh; + memset(&dh, 0, sizeof(dh)); DNSName qname("rings.powerdns.com."); ComboAddress requestor1("192.0.2.1"); ComboAddress requestor2("192.0.2.42"); -- 2.47.2