]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Better clang-tidy suppressions 13365/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Oct 2023 12:31:42 +0000 (14:31 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 Oct 2023 12:31:42 +0000 (14:31 +0200)
pdns/dnsdistdist/dnsdist-nghttp2-in.cc
pdns/dnsdistdist/doh.cc

index 432e9f22c94d41a11ff9759f6595d2e5f977ea9f..7c7864466f1c2345711bd64f71fa260193ce4af8 100644 (file)
@@ -495,13 +495,13 @@ void NGHTTP2Headers::addStaticHeader(std::vector<nghttp2_nv>& headers, NGHTTP2He
   const auto& name = s_headerConstants.at(static_cast<size_t>(nameKey));
   const auto& value = s_headerConstants.at(static_cast<size_t>(valueKey));
 
-  // NOLINTNEXTLINE nghttp2 API
+  // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-pro-type-reinterpret-cast): nghttp2 API
   headers.push_back({const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(name.c_str())), const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(value.c_str())), name.size(), value.size(), NGHTTP2_NV_FLAG_NO_COPY_NAME | NGHTTP2_NV_FLAG_NO_COPY_VALUE});
 }
 
 void NGHTTP2Headers::addCustomDynamicHeader(std::vector<nghttp2_nv>& headers, const std::string& name, const std::string_view& value)
 {
-  // NOLINTNEXTLINE  nghttp2 API
+  // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast,cppcoreguidelines-pro-type-reinterpret-cast): nghttp2 API
   headers.push_back({const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(name.data())), const_cast<uint8_t*>(reinterpret_cast<const uint8_t*>(value.data())), name.size(), value.size(), NGHTTP2_NV_FLAG_NO_COPY_NAME | NGHTTP2_NV_FLAG_NO_COPY_VALUE});
 }
 
index 128bee4126d5d09839fb34f814186525535e2f76..55555292a1861a89cdd68020d6183f8feb09e09d 100644 (file)
@@ -1576,7 +1576,7 @@ void dohThread(ClientState* clientState)
 
     // in this complicated way we insert the DOHServerConfig pointer in there
     h2o_vector_reserve(nullptr, &dsc->h2o_ctx.storage, 1);
-    // NOLINTNEXTLINE: h2o API
+    // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic): h2o API
     dsc->h2o_ctx.storage.entries[0].data = dsc.get();
     ++dsc->h2o_ctx.storage.size;