}
#endif /* defined(HAVE_LMDB) || defined(HAVE_CDB) */
-std::shared_ptr<DNSAction> getHTTPStatusAction(uint16_t status, PacketBuffer&& body, const std::string& contentType, const dnsdist::ResponseConfig& responseConfig)
+std::shared_ptr<DNSAction> getHTTPStatusAction([[maybe_unused]] uint16_t status, [[maybe_unused]] PacketBuffer&& body, [[maybe_unused]] const std::string& contentType, [[maybe_unused]] const dnsdist::ResponseConfig& responseConfig)
{
#if defined(HAVE_DNS_OVER_HTTPS)
return std::shared_ptr<DNSAction>(new HTTPStatusAction(status, std::move(body), contentType, responseConfig));
#endif /* defined(HAVE_YAML_CONFIGURATION) */
-bool loadConfigurationFromFile(const std::string& fileName, bool isClient, bool configCheck)
+bool loadConfigurationFromFile(const std::string& fileName, [[maybe_unused]] bool isClient, [[maybe_unused]] bool configCheck)
{
#if defined(HAVE_YAML_CONFIGURATION)
// this is not very elegant but passing a context to the functions called by the
return totalCount;
}
-size_t dnsdist_ffi_dnsquestion_get_http_headers(dnsdist_ffi_dnsquestion_t* ref, [[maybe_unused]] const dnsdist_ffi_http_header_t** out)
+size_t dnsdist_ffi_dnsquestion_get_http_headers([[maybe_unused]] dnsdist_ffi_dnsquestion_t* ref, [[maybe_unused]] const dnsdist_ffi_http_header_t** out)
{
#if defined(HAVE_DNS_OVER_HTTPS) || defined(HAVE_DNS_OVER_HTTP3)
const auto processHeaders = [&ref](const std::unordered_map<std::string, std::string>& headers) {
dq->result = std::string(str, strSize);
}
-void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* ref, [[maybe_unused]] uint16_t statusCode, [[maybe_unused]] const char* body, [[maybe_unused]] size_t bodyLen, [[maybe_unused]] const char* contentType)
+void dnsdist_ffi_dnsquestion_set_http_response([[maybe_unused]] dnsdist_ffi_dnsquestion_t* ref, [[maybe_unused]] uint16_t statusCode, [[maybe_unused]] const char* body, [[maybe_unused]] size_t bodyLen, [[maybe_unused]] const char* contentType)
{
#if defined(HAVE_DNS_OVER_HTTPS)
if (ref->dq->ids.du) {
frontend->loadTicketsKey(key);
}
});
- luaCtx.writeFunction("loadTicketsKey", [](const std::string& key) {
+ luaCtx.writeFunction("loadTicketsKey", []([[maybe_unused]] const std::string& key) {
for (const auto& frontend : dnsdist::getFrontends()) {
if (!frontend) {
continue;
#endif /* HAVE_DNS_OVER_HTTPS || HAVE_DNS_OVER_HTTP3 */
}
-bool HTTPHeaderRule::matches(const DNSQuestion* dnsQuestion) const
+bool HTTPHeaderRule::matches([[maybe_unused]] const DNSQuestion* dnsQuestion) const
{
#if defined(HAVE_DNS_OVER_HTTPS)
if (dnsQuestion->ids.du) {
#endif /* HAVE_DNS_OVER_HTTPS || HAVE_DNS_OVER_HTTP3 */
}
-bool HTTPPathRule::matches(const DNSQuestion* dnsQuestion) const
+bool HTTPPathRule::matches([[maybe_unused]] const DNSQuestion* dnsQuestion) const
{
#if defined(HAVE_DNS_OVER_HTTPS)
if (dnsQuestion->ids.du) {
#endif /* HAVE_DNS_OVER_HTTPS || HAVE_DNS_OVER_HTTP3 */
}
-bool HTTPPathRegexRule::matches(const DNSQuestion* dnsQuestion) const
+bool HTTPPathRegexRule::matches([[maybe_unused]] const DNSQuestion* dnsQuestion) const
{
#if defined(HAVE_DNS_OVER_HTTPS)
if (dnsQuestion->ids.du) {