From: Otto Moerbeek Date: Thu, 4 Sep 2025 07:45:38 +0000 (+0200) Subject: Avoid a few cases of warning: C++20 says that these are ambiguous, even though the... X-Git-Tag: rec-5.4.0-alpha1~100^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=779eb120f13ff83a587b885c1f8e749e7fbd37fe;p=thirdparty%2Fpdns.git Avoid a few cases of warning: C++20 says that these are ambiguous, even though the second is reversed Signed-off-by: Otto Moerbeek --- diff --git a/pdns/test-dnsrecordcontent.cc b/pdns/test-dnsrecordcontent.cc index d3488e65dc..00c1892beb 100644 --- a/pdns/test-dnsrecordcontent.cc +++ b/pdns/test-dnsrecordcontent.cc @@ -17,10 +17,10 @@ BOOST_AUTO_TEST_CASE(test_equality) { ARecordContent a1(ip), a2(ip), a3(ip2); AAAARecordContent aaaa(ip6), aaaa1(ip6); - BOOST_CHECK(a1==a2); - BOOST_CHECK(!(a1==a3)); + BOOST_CHECK(a1.operator==(a2)); + BOOST_CHECK(!(a1.operator==(a3))); - BOOST_CHECK(aaaa == aaaa1); + BOOST_CHECK(aaaa.operator==(aaaa1)); auto rec1 = DNSRecordContent::make(QType::A, 1, "192.168.0.1"); auto rec2 = DNSRecordContent::make(QType::A, 1, "192.168.222.222"); @@ -40,8 +40,8 @@ BOOST_AUTO_TEST_CASE(test_equality) { BOOST_CHECK(!(*rec1==*rec3)); NSRecordContent ns1(DNSName("ns1.powerdns.com")), ns2(DNSName("NS1.powerdns.COM")), ns3(DNSName("powerdns.net")); - BOOST_CHECK(ns1==ns2); - BOOST_CHECK(!(ns1==ns3)); + BOOST_CHECK(ns1.operator==(ns2)); + BOOST_CHECK(!(ns1.operator==(ns3))); } BOOST_AUTO_TEST_SUITE_END() diff --git a/pdns/validate.cc b/pdns/validate.cc index 24a090bdec..bb6928f02c 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -1225,7 +1225,7 @@ vState validateDNSKeysAgainstDS(time_t now, const DNSName& zone, const dsset_t& try { dsrc2 = makeDSFromDNSKey(zone, *drc, dsrc.d_digesttype); dsCreated = true; - isValid = dsrc == dsrc2; + isValid = dsrc.operator==(dsrc2); } catch (const std::exception &e) { VLOG(log, zone << ": Unable to make DS from DNSKey: "<