From 7b56849be41fdd342c8d92c243df6370a53c8305 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 18 Sep 2021 14:24:56 +0100 Subject: Add JT recommended warnings --- libmysqlpp/unittests/testmysql.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libmysqlpp/unittests') 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 buf {}; for (std::streamsize r; (r = in.readsome(buf.data(), buf.size())) > 0;) { - ro->bulkUploadData(buf.data(), r); + ro->bulkUploadData(buf.data(), static_cast(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() -- cgit v1.2.3