]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsname: Fix clang-tidy warnings
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 Jul 2025 15:12:14 +0000 (17:12 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 28 Jul 2025 15:12:14 +0000 (17:12 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsname.cc
pdns/test-dnsname_cc.cc

index ef1c4e621e11361700c41f7e925a887072064638..9d21304107cf93c79e92fa992f9903c8a4ea437a 100644 (file)
@@ -816,6 +816,7 @@ bool DNSName::matches(const std::string_view& wire_uncompressed) const
 
   const auto* our = d_storage.cbegin();
   const auto* other = wire_uncompressed.cbegin();
+  // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
   for (; our != d_storage.cend() && other != wire_uncompressed.cend(); ++our, ++other) {
     if (dns_tolower(*other) != dns_tolower(*our)) {
       return false;
index ad4f31522f4bbd5e09264ea4a9925e76d2f12e5e..019e864e1ec778aa628abe5ca5dc0bd33aa66f92 100644 (file)
@@ -1038,7 +1038,7 @@ BOOST_AUTO_TEST_CASE(test_raw_data_comparison) {
   GenericDNSPacketWriter<PacketBuffer> packetWriter(query, aroot, QType::A, QClass::IN, 0);
 
   {
-    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast,cppcoreguidelines-pro-bounds-pointer-arithmetic)
     const std::string_view raw(reinterpret_cast<const char*>(query.data()) + sizeof(dnsheader), query.size() - sizeof(dnsheader));
     BOOST_CHECK(aroot.matches(raw));