diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-18 14:45:48 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-18 14:45:48 +0100 |
commit | 5c72a2b6a0076d85ce12884bca3b1de89df4db1b (patch) | |
tree | e702c2a123407ac556e32b15144bf5eba99f4277 | |
parent | Add JT recommended warnings (diff) | |
download | libdbpp-sqlite-5c72a2b6a0076d85ce12884bca3b1de89df4db1b.tar.bz2 libdbpp-sqlite-5c72a2b6a0076d85ce12884bca3b1de89df4db1b.tar.xz libdbpp-sqlite-5c72a2b6a0076d85ce12884bca3b1de89df4db1b.zip |
Pass cppcheck and clang-tidy
-rw-r--r-- | libsqlitepp/sqlite-modifycommand.cpp | 2 | ||||
-rw-r--r-- | libsqlitepp/unittests/testsqlite.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/libsqlitepp/sqlite-modifycommand.cpp b/libsqlitepp/sqlite-modifycommand.cpp index df859ca..d69516d 100644 --- a/libsqlitepp/sqlite-modifycommand.cpp +++ b/libsqlitepp/sqlite-modifycommand.cpp @@ -15,7 +15,7 @@ SQLite::ModifyCommand::execute(bool anc) sqlite3_reset(stmt); throw Error(c->db); } - unsigned int rows = static_cast<unsigned int>(sqlite3_changes(c->db)); + auto rows = static_cast<unsigned int>(sqlite3_changes(c->db)); sqlite3_reset(stmt); if (rows == 0 && !anc) { throw DB::NoRowsAffected(); diff --git a/libsqlitepp/unittests/testsqlite.cpp b/libsqlitepp/unittests/testsqlite.cpp index 37f17ce..5a14bfb 100644 --- a/libsqlitepp/unittests/testsqlite.cpp +++ b/libsqlitepp/unittests/testsqlite.cpp @@ -43,6 +43,7 @@ BOOST_AUTO_TEST_CASE(bindAndSend) mod->bindParamF(1, testDouble); mod->bindParamS(2, testString); mod->execute(); + // cppcheck-suppress assertWithSideEffect BOOST_REQUIRE_EQUAL(2, rw->insertId()); } |