From: Remi Gacogne Date: Thu, 24 Oct 2019 08:32:55 +0000 (+0200) Subject: LMDB: Initialize values in the init list to make cppcheck happy X-Git-Tag: dnsdist-1.4.0-rc4~2^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bbf726cab32b902530b2e66bf9f36190127c925d;p=pdns LMDB: Initialize values in the init list to make cppcheck happy --- diff --git a/ext/lmdb-safe/lmdb-safe.hh b/ext/lmdb-safe/lmdb-safe.hh index 9b658741b..66aae7e50 100644 --- a/ext/lmdb-safe/lmdb-safe.hh +++ b/ext/lmdb-safe/lmdb-safe.hh @@ -43,9 +43,8 @@ The error strategy. Anything that "should never happen" turns into an exception. class MDBDbi { public: - MDBDbi() + MDBDbi(): d_dbi(-1) { - d_dbi = -1; } explicit MDBDbi(MDB_env* env, MDB_txn* txn, string_view dbname, int flags); @@ -151,9 +150,8 @@ template<> inline string_view MDBOutVal::get() const class MDBInVal { public: - MDBInVal(const MDBOutVal& rhs) + MDBInVal(const MDBOutVal& rhs): d_mdbval(rhs.d_mdbval) { - d_mdbval = rhs.d_mdbval; } template