]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix "unused parameter" warnings in some configurations
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 17 Feb 2025 16:17:14 +0000 (17:17 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 7 Mar 2025 16:24:56 +0000 (17:24 +0100)
pdns/dnsdistdist/dnsdist-crypto.cc
pdns/dnsdistdist/dnsdist-lua.cc

index df4beebcb27b4ae5318ae0182cfbe77d152a198d..c31727b4ae2b10f9c609e545c187189866a0f275 100644 (file)
@@ -296,7 +296,7 @@ void Nonce::init()
 {
 }
 
-void Nonce::merge(const Nonce& lower, const Nonce& higher)
+void Nonce::merge(const Nonce&, const Nonce&)
 {
 }
 
@@ -304,21 +304,21 @@ void Nonce::increment()
 {
 }
 
-std::string encryptSym(const std::string_view& msg, const std::string& key, Nonce& nonce, bool incrementNonce)
+std::string encryptSym(const std::string_view& msg, const std::string&, Nonce&, bool)
 {
   return std::string(msg);
 }
-std::string decryptSym(const std::string_view& msg, const std::string& key, Nonce& nonce, bool incrementNonce)
+std::string decryptSym(const std::string_view& msg, const std::string&, Nonce&, bool)
 {
   return std::string(msg);
 }
 
-string newKey(bool base64Encoded)
+string newKey(bool)
 {
   return "\"plaintext\"";
 }
 
-bool isValidKey(const std::string& key)
+bool isValidKey(const std::string&)
 {
   return true;
 }
index 2276176f0dda7b8336f970f9b319527664d86cf5..5371261fd22a24df8688568381b66b7241d89c47 100644 (file)
@@ -1302,7 +1302,7 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
     dnsdist::console::clearHistory();
   });
 
-  luaCtx.writeFunction("testCrypto", [](boost::optional<string> optTestMsg) {
+  luaCtx.writeFunction("testCrypto", []([[maybe_unused]] boost::optional<string> optTestMsg) {
     setLuaNoSideEffect();
 #if defined(HAVE_LIBSODIUM) || defined(HAVE_LIBCRYPTO)
     try {