]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Silence Coverity 1462719 Unchecked return value from library. 12934/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 21 Jun 2023 12:25:03 +0000 (14:25 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 21 Jun 2023 12:25:03 +0000 (14:25 +0200)
Call should not fail and it's a best effort anyway in this case

pdns/recursordist/lwres.cc

index ad9bcbb81d5cdd4c72fbbcf8502ca9a708c3aa56..f6c6fa2479c9b8b0c9fd3a192c90e1f688ec41f5 100644 (file)
@@ -486,7 +486,7 @@ static LWResult::Result asyncresolve(const ComboAddress& ip, const DNSName& doma
       if (fstrmQEnabled || fstrmREnabled) {
         localip.sin4.sin_family = ip.sin4.sin_family;
         socklen_t slen = ip.getSocklen();
-        getsockname(queryfd, reinterpret_cast<sockaddr*>(&localip), &slen);
+        (void)getsockname(queryfd, reinterpret_cast<sockaddr*>(&localip), &slen); // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast))
       }
       if (fstrmQEnabled) {
         logFstreamQuery(fstrmLoggers, queryTime, localip, ip, DnstapMessage::ProtocolType::DoUDP, context ? context->d_auth : boost::none, vpacket);