From 5c72a2b6a0076d85ce12884bca3b1de89df4db1b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 18 Sep 2021 14:45:48 +0100 Subject: Pass cppcheck and clang-tidy --- libsqlitepp/sqlite-modifycommand.cpp | 2 +- libsqlitepp/unittests/testsqlite.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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(sqlite3_changes(c->db)); + auto rows = static_cast(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()); } -- cgit v1.2.3