diff options
Diffstat (limited to 'libsqlitepp')
-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()); } |