]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Apply Otto's suggestions (thanks!) 15690/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 19 Jun 2025 07:56:07 +0000 (09:56 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 19 Jun 2025 07:56:07 +0000 (09:56 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-lua-bindings-dnsquestion.cc
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/dnsdist-lua-ffi.hh

index 83f1591ad4f6cdee6f6da9b358edb443a3a21f43..27c17a94664470e6b5edb2d71fce271d3b0f074c 100644 (file)
@@ -31,7 +31,7 @@
 
 #include "protozero.hh"
 
-static void addMetaKeyAndValuesToProtobufContent(DNSQuestion& dnsQuestion, const std::string& key, const LuaArray<boost::variant<int64_t, std::string>>& values)
+static void addMetaKeyAndValuesToProtobufContent([[maybe_unused]] DNSQuestion& dnsQuestion, [[maybe_unused]] const std::string& key, [[maybe_unused]] const LuaArray<boost::variant<int64_t, std::string>>& values)
 {
 #if !defined(DISABLE_PROTOBUF)
   protozero::pbf_writer pbfWriter{dnsQuestion.d_rawProtobufContent};
index 01838f1343cace207b4d4f79110edddb7df9f969..0ffa484e84b7d2d5847241d8e621eb9cfe3ce99d 100644 (file)
@@ -2279,7 +2279,7 @@ void dnsdist_ffi_svc_record_parameters_free(dnsdist_ffi_svc_record_parameters* p
 
 void dnsdist_ffi_dnsquestion_meta_begin_key([[maybe_unused]] dnsdist_ffi_dnsquestion_t* dnsQuestion, [[maybe_unused]] const char* key, [[maybe_unused]] size_t keyLen)
 {
-#ifndef DISABLE_PROTOBUF
+#if !defined(DISABLE_PROTOBUF)
   if (dnsQuestion == nullptr || key == nullptr || keyLen == 0) {
     return;
   }
@@ -2298,7 +2298,7 @@ void dnsdist_ffi_dnsquestion_meta_begin_key([[maybe_unused]] dnsdist_ffi_dnsques
 
 void dnsdist_ffi_dnsquestion_meta_add_str_value_to_key([[maybe_unused]] dnsdist_ffi_dnsquestion_t* dnsQuestion, [[maybe_unused]] const char* value, [[maybe_unused]] size_t valueLen)
 {
-#ifndef DISABLE_PROTOBUF
+#if !defined(DISABLE_PROTOBUF)
   if (dnsQuestion == nullptr || value == nullptr || valueLen == 0) {
     return;
   }
@@ -2314,7 +2314,7 @@ void dnsdist_ffi_dnsquestion_meta_add_str_value_to_key([[maybe_unused]] dnsdist_
 
 void dnsdist_ffi_dnsquestion_meta_add_int64_value_to_key([[maybe_unused]] dnsdist_ffi_dnsquestion_t* dnsQuestion, [[maybe_unused]] int64_t value)
 {
-#ifndef DISABLE_PROTOBUF
+#if !defined(DISABLE_PROTOBUF)
   if (dnsQuestion == nullptr) {
     return;
   }
@@ -2330,7 +2330,7 @@ void dnsdist_ffi_dnsquestion_meta_add_int64_value_to_key([[maybe_unused]] dnsdis
 
 void dnsdist_ffi_dnsquestion_meta_end_key([[maybe_unused]] dnsdist_ffi_dnsquestion_t* dnsQuestion)
 {
-#ifndef DISABLE_PROTOBUF
+#if !defined(DISABLE_PROTOBUF)
   if (dnsQuestion == nullptr) {
     return;
   }
index b2c7110c155c21ad5540efdc56b65c7f3c6e106c..3fc30f13e500106f4a0c0c25150edb33b102ac99 100644 (file)
@@ -65,7 +65,7 @@ struct dnsdist_ffi_dnsquestion_t
   std::unique_ptr<std::vector<dnsdist_ffi_tag_t>> tagsVect;
   std::unique_ptr<std::vector<dnsdist_ffi_proxy_protocol_value_t>> proxyProtocolValuesVect;
   std::unique_ptr<std::unordered_map<std::string, std::string>> httpHeaders;
-#ifndef DISABLE_PROTOBUF
+#if !defined(DISABLE_PROTOBUF)
   protozero::pbf_writer pbfWriter;
   protozero::pbf_writer pbfMetaWriter;
   protozero::pbf_writer pbfMetaValueWriter;