Skip to content

Commit

Permalink
Address "not used" warnings when compiling without DNS over TLS or HT…
Browse files Browse the repository at this point in the history
…TPS.
  • Loading branch information
miodvallat committed Jan 24, 2025
1 parent 9c42532 commit 7da68ae
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pdns/tcpiohandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@

const bool TCPIOHandler::s_disableConnectForUnitTests = false;

#ifdef HAVE_LIBSODIUM
#include <sodium.h>
#endif /* HAVE_LIBSODIUM */

TLSCtx::tickets_key_added_hook TLSCtx::s_ticketsKeyAddedHook{nullptr};

#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS) // {

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

namespace {
bool shouldDoVerboseLogging()
{
Expand All @@ -20,12 +28,6 @@ bool shouldDoVerboseLogging()
}
}

#ifdef HAVE_LIBSODIUM
#include <sodium.h>
#endif /* HAVE_LIBSODIUM */

TLSCtx::tickets_key_added_hook TLSCtx::s_ticketsKeyAddedHook{nullptr};

static std::vector<std::vector<uint8_t>> getALPNVector(TLSFrontend::ALPN alpn, bool client)
{
if (alpn == TLSFrontend::ALPN::DoT) {
Expand All @@ -46,7 +48,6 @@ static std::vector<std::vector<uint8_t>> getALPNVector(TLSFrontend::ALPN alpn, b
return {};
}

#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS)
#ifdef HAVE_LIBSSL

#include <openssl/conf.h>
Expand Down Expand Up @@ -1877,7 +1878,7 @@ class GnuTLSIOCtx: public TLSCtx

#endif /* HAVE_GNUTLS */

#endif /* HAVE_DNS_OVER_TLS || HAVE_DNS_OVER_HTTPS */
#endif /* HAVE_DNS_OVER_TLS || HAVE_DNS_OVER_HTTPS */ // }

bool TLSFrontend::setupTLS()
{
Expand Down

0 comments on commit 7da68ae

Please sign in to comment.