]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: ignore clangd-tidy warnings
authorEnsar Sarajčić <es.ensar@gmail.com>
Fri, 13 Dec 2024 15:02:24 +0000 (16:02 +0100)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2024 15:02:24 +0000 (16:02 +0100)
Co-authored-by: Remi Gacogne <github@coredump.fr>
pdns/dnsdistdist/dnsdist-lua-ffi.cc
pdns/dnsdistdist/dnsdist-lua.cc

index 92e042e285066d44f72ccf2d433a32957193ed9e..03ffb98a260226a8ec79248ade20bab936445a32 100644 (file)
@@ -1056,6 +1056,7 @@ size_t dnsdist_ffi_generate_proxy_protocol_payload(const size_t addrSize, const
     if (valuesCount > 0) {
       valuesVect.reserve(valuesCount);
       for (size_t idx = 0; idx < valuesCount; idx++) {
+        // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
         valuesVect.push_back({std::string(values[idx].value, values[idx].size), values[idx].type});
       }
     }
@@ -1085,6 +1086,7 @@ size_t dnsdist_ffi_dnsquestion_generate_proxy_protocol_payload(const dnsdist_ffi
   if (valuesCount > 0) {
     valuesVect.reserve(valuesCount);
     for (size_t idx = 0; idx < valuesCount; idx++) {
+      // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
       valuesVect.push_back({std::string(values[idx].value, values[idx].size), values[idx].type});
     }
   }
index eec7e4dc97f41bf47fecf1990f4788cfdfefe784..d97c8329e0dece08950b4270195794920ae83351 100644 (file)
@@ -3436,6 +3436,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     }
     return true;
   });
+  // NOLINTNEXTLINE(performance-unnecessary-value-param)
   luaCtx.writeFunction("incMetric", [](const std::string& name, boost::optional<boost::variant<uint64_t, update_metric_opts_t>> opts) {
     auto incOpts = opts.get_value_or(1);
     uint64_t step = 1;
@@ -3457,6 +3458,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     }
     return std::get<uint64_t>(result);
   });
+  // NOLINTNEXTLINE(performance-unnecessary-value-param)
   luaCtx.writeFunction("decMetric", [](const std::string& name, boost::optional<boost::variant<uint64_t, update_metric_opts_t>> opts) {
     auto decOpts = opts.get_value_or(1);
     uint64_t step = 1;