From: Fred Morcos Date: Fri, 17 Feb 2023 08:26:12 +0000 (+0100) Subject: Revert "LMDB: Fix unused argument warnings" X-Git-Tag: dnsdist-1.8.0-rc1~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3374a1dbece151178c5bd8249ebfe5c885992f1;p=thirdparty%2Fpdns.git Revert "LMDB: Fix unused argument warnings" This reverts commit 95e730e65c5bac46cfc9df0dae8ac6c6d667d0b4. --- diff --git a/ext/lmdb-safe/lmdb-safe.cc b/ext/lmdb-safe/lmdb-safe.cc index 09eb840809..fc9e7c7197 100644 --- a/ext/lmdb-safe/lmdb-safe.cc +++ b/ext/lmdb-safe/lmdb-safe.cc @@ -16,7 +16,7 @@ static string MDBError(int rc) return mdb_strerror(rc); } -MDBDbi::MDBDbi(MDB_env* /* env */, MDB_txn* txn, const string_view dbname, int flags) +MDBDbi::MDBDbi(MDB_env* env, MDB_txn* txn, const string_view dbname, int flags) { // A transaction that uses this function must finish (either commit or abort) before any other transaction in the process may use this function. diff --git a/ext/lmdb-safe/lmdb-typed.hh b/ext/lmdb-safe/lmdb-typed.hh index ffb34327e0..0810d9a97e 100644 --- a/ext/lmdb-safe/lmdb-typed.hh +++ b/ext/lmdb-safe/lmdb-typed.hh @@ -159,17 +159,17 @@ struct index_on_function : LMDBIndexOps - void put(MDBRWTransaction& /* txn */, const Class& /* t */, uint32_t /* id */, int /* flags */ = 0) + template + void put(MDBRWTransaction& txn, const Class& t, uint32_t id, int flags=0) {} - - template - void del(MDBRWTransaction& /* txn */, const Class& /* t */, uint32_t /* id */) + template + void del(MDBRWTransaction& txn, const Class& t, uint32_t id) {} - void openDB(std::shared_ptr& /* env */, string_view /* str */, int /* flags */) - {} + void openDB(std::shared_ptr& env, string_view str, int flags) + { + } typedef uint32_t type; // dummy }; @@ -330,12 +330,12 @@ public: d_cursor.del(); } - bool operator!=(const eiter_t& /* rhs */) const + bool operator!=(const eiter_t& rhs) const { return !d_end; } - bool operator==(const eiter_t& /* rhs */) const + bool operator==(const eiter_t& rhs) const { return d_end; }