diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-18 14:24:56 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-09-18 14:24:56 +0100 |
commit | 7b56849be41fdd342c8d92c243df6370a53c8305 (patch) | |
tree | 47621c380edfd8adc779caab5d961868be78526c /libmysqlpp/unittests | |
parent | Replace straggling typedef (diff) | |
download | libdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.tar.bz2 libdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.tar.xz libdbpp-mysql-7b56849be41fdd342c8d92c243df6370a53c8305.zip |
Add JT recommended warnings
Diffstat (limited to 'libmysqlpp/unittests')
-rw-r--r-- | libmysqlpp/unittests/testmysql.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmysqlpp/unittests/testmysql.cpp b/libmysqlpp/unittests/testmysql.cpp index 2f60e68..fdfb0a8 100644 --- a/libmysqlpp/unittests/testmysql.cpp +++ b/libmysqlpp/unittests/testmysql.cpp @@ -21,7 +21,7 @@ public: BOOST_GLOBAL_FIXTURE(StandardMockDatabase); -BOOST_FIXTURE_TEST_SUITE(Core, DB::TestCore); +BOOST_FIXTURE_TEST_SUITE(Core, DB::TestCore) BOOST_AUTO_TEST_CASE(transactions) { @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE(bulkload) } std::array<char, BUFSIZ> buf {}; for (std::streamsize r; (r = in.readsome(buf.data(), buf.size())) > 0;) { - ro->bulkUploadData(buf.data(), r); + ro->bulkUploadData(buf.data(), static_cast<size_t>(r)); } ro->endBulkUpload(nullptr); assertScalarValueHelper(*count, 800); @@ -133,7 +133,7 @@ BOOST_AUTO_TEST_CASE(insertId) { auto ro = DB::MockDatabase::openConnectionTo("mysqlmock"); auto ins = ro->modify("INSERT INTO inserts(num) VALUES(?)"); - int prevId = 0; + int64_t prevId = 0; for (int n : {4, 40, -4}) { ins->bindParamI(0, n); ins->execute(); @@ -150,4 +150,4 @@ BOOST_AUTO_TEST_CASE(errors) BOOST_REQUIRE_THROW((void)DB::ConnectionFactory::createNew("mysql", "server=nohost"), DB::ConnectionError); } -BOOST_AUTO_TEST_SUITE_END(); +BOOST_AUTO_TEST_SUITE_END() |