From 88a256c5f3f5353a4e71dd0c529b18e9e3f258d5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 18 Sep 2021 14:25:36 +0100 Subject: Add JT recommended warnings --- Jamroot.jam | 15 +++++++++++++++ libdbpp/column.cpp | 5 +---- libdbpp/column.h | 11 +++++++++-- libdbpp/command.cpp | 6 +++--- libdbpp/command.h | 17 ++++++++++++----- libdbpp/connection.cpp | 10 +++++----- libdbpp/mockDatabase.cpp | 8 ++++---- libdbpp/selectcommand.cpp | 4 ++-- libdbpp/sqlParse.ll | 10 +++++++--- libdbpp/tablepatch.cpp | 1 - libdbpp/unittests/Jamfile.jam | 2 -- libdbpp/unittests/libdbpp-mysql | 2 +- libdbpp/unittests/libdbpp-odbc | 2 +- libdbpp/unittests/libdbpp-postgresql | 2 +- libdbpp/unittests/libdbpp-sqlite | 2 +- libdbpp/unittests/mockdb.cpp | 4 ++-- libdbpp/unittests/testParse.cpp | 2 +- libdbpp/unittests/testPatch.cpp | 24 ++++++++++++------------ libdbpp/unittests/testUtils.cpp | 27 +++++++++++++-------------- 19 files changed, 90 insertions(+), 64 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index b13bf61..51d89b0 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -1,4 +1,5 @@ import os ; +import testing ; using gcc : : [ os.environ CXX ] ; using pkg-config ; @@ -15,6 +16,20 @@ project debug:extra debug:on debug:-Wnon-virtual-dtor + debug:-Wold-style-cast + debug:-Wcast-align + debug:-Wunused + debug:-Woverloaded-virtual + debug:-Wpedantic + debug:-Wconversion + debug:-Wsign-conversion + debug:-Wnull-dereference + debug:-Wdouble-promotion + debug:-Wformat=2 + gcc,debug:-Wduplicated-cond + gcc,debug:-Wduplicated-branches + gcc,debug:-Wlogical-op + gcc,debug:-Wuseless-cast coverage:on tidy:boost-* tidy:bugprone-* diff --git a/libdbpp/column.cpp b/libdbpp/column.cpp index 0f862de..8b13462 100644 --- a/libdbpp/column.cpp +++ b/libdbpp/column.cpp @@ -7,14 +7,12 @@ namespace DB { Column::Column(const Glib::ustring & n, unsigned int i) : colNo(i), name(n.collate_key()) { } - Column::~Column() = default; - static std::string demangle(const char * const mangled) { std::unique_ptr r(abi::__cxa_demangle(mangled, nullptr, nullptr, nullptr), &free); return &*r; - }; + } InvalidConversion::InvalidConversion(const char * const f, const char * const t) : from(demangle(f)), to(demangle(t)) @@ -42,5 +40,4 @@ namespace DB { { throw DB::ColumnTypeNotSupported(); } - } diff --git a/libdbpp/column.h b/libdbpp/column.h index e4c6895..17f6223 100644 --- a/libdbpp/column.h +++ b/libdbpp/column.h @@ -6,7 +6,14 @@ #include #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#ifndef __clang__ +# pragma GCC diagnostic ignored "-Wuseless-cast" +#endif #include +#pragma GCC diagnostic pop #include #include #include @@ -41,7 +48,7 @@ namespace DB { public: /// Creates a new column with the given name and ordinal. Column(const Glib::ustring &, unsigned int); - virtual ~Column() = 0; + virtual ~Column() = default; /// Standard special members SPECIAL_MEMBERS_MOVE_RO(Column); @@ -123,7 +130,7 @@ namespace DB { return; } if constexpr (std::is_convertible::value) { - target = (T)v; + target = static_cast(v); return; } } diff --git a/libdbpp/command.cpp b/libdbpp/command.cpp index b4eec6b..f2c6934 100644 --- a/libdbpp/command.cpp +++ b/libdbpp/command.cpp @@ -2,9 +2,9 @@ #include "connection.h" #include -INSTANTIATEFACTORY(DB::CommandOptions, std::size_t, const DB::CommandOptionsMap &); -NAMEDFACTORY("", DB::CommandOptions, DB::CommandOptionsFactory); -PLUGINRESOLVER(DB::CommandOptionsFactory, DB::Connection::resolvePlugin); +INSTANTIATEFACTORY(DB::CommandOptions, std::size_t, const DB::CommandOptionsMap &) +NAMEDFACTORY("", DB::CommandOptions, DB::CommandOptionsFactory) +PLUGINRESOLVER(DB::CommandOptionsFactory, DB::Connection::resolvePlugin) DB::Command::Command(std::string s) : sql(std::move(s)) { } diff --git a/libdbpp/command.h b/libdbpp/command.h index 1468e2b..e368b5c 100644 --- a/libdbpp/command.h +++ b/libdbpp/command.h @@ -8,7 +8,14 @@ #include #include #include +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-conversion" +#ifndef __clang__ +# pragma GCC diagnostic ignored "-Wuseless-cast" +#endif #include +#pragma GCC diagnostic pop #include #include #include @@ -173,12 +180,12 @@ namespace DB { bindNull(i); \ } /// @cond - OPTWRAPPER(bindParamI); - OPTWRAPPER(bindParamF); + OPTWRAPPER(bindParamI) + OPTWRAPPER(bindParamF) // NOLINTNEXTLINE(hicpp-no-array-decay) - OPTWRAPPER(bindParamS); - OPTWRAPPER(bindParamB); - OPTWRAPPER(bindParamT); + OPTWRAPPER(bindParamS) + OPTWRAPPER(bindParamB) + OPTWRAPPER(bindParamT) /// @endcond #undef OPTWRAPPER /// Bind a (possibly null) c-string to parameter i. diff --git a/libdbpp/connection.cpp b/libdbpp/connection.cpp index e281aaf..4ba779d 100644 --- a/libdbpp/connection.cpp +++ b/libdbpp/connection.cpp @@ -132,7 +132,7 @@ DB::Connection::bulkUploadData(std::istream & in) const } std::array buf {}; size_t total = 0; - for (std::streamsize r; (r = in.readsome(buf.data(), buf.size())) > 0;) { + for (std::size_t r; (r = static_cast(in.readsome(buf.data(), buf.size()))) > 0;) { bulkUploadData(buf.data(), r); total += r; } @@ -151,8 +151,8 @@ DB::Connection::bulkUploadData(FILE * in) const bulkUploadData(buf.data(), r); total += r; } - if ((int)r < 0) { - throw std::system_error(-r, std::system_category()); + if (-r > 0) { + throw std::system_error(static_cast(-r), std::system_category()); } return total; } @@ -198,5 +198,5 @@ DB::TransactionScope::~TransactionScope() noexcept } } -INSTANTIATEFACTORY(DB::Connection, std::string); -PLUGINRESOLVER(DB::ConnectionFactory, DB::Connection::resolvePlugin); +INSTANTIATEFACTORY(DB::Connection, std::string) +PLUGINRESOLVER(DB::ConnectionFactory, DB::Connection::resolvePlugin) diff --git a/libdbpp/mockDatabase.cpp b/libdbpp/mockDatabase.cpp index d52413e..8c168cf 100644 --- a/libdbpp/mockDatabase.cpp +++ b/libdbpp/mockDatabase.cpp @@ -7,10 +7,10 @@ #include #include -INSTANTIATEPLUGINOF(DB::MockDatabase); +INSTANTIATEPLUGINOF(DB::MockDatabase) INSTANTIATEFACTORY( - DB::MockDatabase, const std::string &, const std::string &, const std::vector &); -PLUGINRESOLVER(DB::MockDatabaseFactory, DB::Connection::resolvePlugin); + DB::MockDatabase, const std::string &, const std::string &, const std::vector &) +PLUGINRESOLVER(DB::MockDatabaseFactory, DB::Connection::resolvePlugin) namespace DB { @@ -25,7 +25,7 @@ namespace DB { void MockDatabase::PlaySchemaScripts(const std::vector & ss) const { - auto conn = ConnectionPtr(openConnection()); + auto conn = openConnection(); try { for (const auto & s : ss) { conn->beginTx(); diff --git a/libdbpp/selectcommand.cpp b/libdbpp/selectcommand.cpp index 216c8f8..171c1b7 100644 --- a/libdbpp/selectcommand.cpp +++ b/libdbpp/selectcommand.cpp @@ -33,7 +33,7 @@ namespace DB { boost::multi_index::member>>>; class SelectCommand::Columns : public ColumnsBase { }; -}; +} DB::SelectCommand::SelectCommand(const std::string & sql) : DB::Command(sql), columns(std::make_unique()) { } @@ -66,7 +66,7 @@ DB::SelectCommand::getOrdinal(const Glib::ustring & n) const unsigned int DB::SelectCommand::columnCount() const { - return columns->size(); + return static_cast(columns->size()); } const DB::ColumnPtr & diff --git a/libdbpp/sqlParse.ll b/libdbpp/sqlParse.ll index d36dae5..37dfba1 100644 --- a/libdbpp/sqlParse.ll +++ b/libdbpp/sqlParse.ll @@ -10,9 +10,13 @@ %{ #include "sqlParse.h" #pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wconversion" #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#pragma GCC diagnostic ignored "-Wold-style-cast" #ifdef __clang__ #pragma GCC diagnostic ignored "-Wnull-conversion" +#else +#pragma GCC diagnostic ignored "-Wuseless-cast" #endif %} @@ -68,7 +72,7 @@ scriptdir "$SCRIPTDIR" } <> { - throw SqlParseException("Unterminated comment", yylineno); + throw SqlParseException("Unterminated comment", static_cast(yylineno)); } {non_newline}* { @@ -128,7 +132,7 @@ scriptdir "$SCRIPTDIR" } <> { - throw SqlParseException("Unterminated dollar quoted string", yylineno); + throw SqlParseException("Unterminated dollar quoted string", static_cast(yylineno)); } {any} { @@ -136,7 +140,7 @@ scriptdir "$SCRIPTDIR" } <> { - throw SqlParseException("Unterminated quoted string", yylineno); + throw SqlParseException("Unterminated quoted string", static_cast(yylineno)); } {term} { diff --git a/libdbpp/tablepatch.cpp b/libdbpp/tablepatch.cpp index 28f8350..bbad348 100644 --- a/libdbpp/tablepatch.cpp +++ b/libdbpp/tablepatch.cpp @@ -286,7 +286,6 @@ DB::Connection::patchUpdates(TablePatch * tp) // ----------------------------------------------------------------- auto upd = modify(updSql); unsigned int offset = 0; - tp->where->bindParams(upd.get(), offset); if (tp->where) { tp->where->bindParams(upd.get(), offset); } diff --git a/libdbpp/unittests/Jamfile.jam b/libdbpp/unittests/Jamfile.jam index 915cdf2..61c1e5e 100644 --- a/libdbpp/unittests/Jamfile.jam +++ b/libdbpp/unittests/Jamfile.jam @@ -1,5 +1,3 @@ -import testing ; - import feature : feature ; path-constant me : . ; diff --git a/libdbpp/unittests/libdbpp-mysql b/libdbpp/unittests/libdbpp-mysql index 0778234..7b56849 160000 --- a/libdbpp/unittests/libdbpp-mysql +++ b/libdbpp/unittests/libdbpp-mysql @@ -1 +1 @@ -Subproject commit 0778234c3ffd82f3b9987bcb64de32f2647aba4d +Subproject commit 7b56849be41fdd342c8d92c243df6370a53c8305 diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc index d046504..dbf98a3 160000 --- a/libdbpp/unittests/libdbpp-odbc +++ b/libdbpp/unittests/libdbpp-odbc @@ -1 +1 @@ -Subproject commit d046504464cb476be9ff3f810ad93f6c3961c8ac +Subproject commit dbf98a34e08558b91328cb414447e9961c222033 diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql index 30133bd..216c87c 160000 --- a/libdbpp/unittests/libdbpp-postgresql +++ b/libdbpp/unittests/libdbpp-postgresql @@ -1 +1 @@ -Subproject commit 30133bd4281d777a6b32fa203fca5c6249435078 +Subproject commit 216c87cbb7228d9130eead5e374dfd7a11a96b98 diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite index c58e1ee..7e5c360 160000 --- a/libdbpp/unittests/libdbpp-sqlite +++ b/libdbpp/unittests/libdbpp-sqlite @@ -1 +1 @@ -Subproject commit c58e1ee62175d8babc69bb0ff54b4625725d594d +Subproject commit 7e5c360a8c8eee8ebe8b1c18e49be5b4af8dac57 diff --git a/libdbpp/unittests/mockdb.cpp b/libdbpp/unittests/mockdb.cpp index 722592a..30180b9 100644 --- a/libdbpp/unittests/mockdb.cpp +++ b/libdbpp/unittests/mockdb.cpp @@ -78,7 +78,7 @@ MockMock::DropDatabase() const { } -FACTORY(MockMock, DB::MockDatabaseFactory); -FACTORY(MockDb, DB::ConnectionFactory); +FACTORY(MockMock, DB::MockDatabaseFactory) +FACTORY(MockDb, DB::ConnectionFactory) // LCOV_EXCL_STOP diff --git a/libdbpp/unittests/testParse.cpp b/libdbpp/unittests/testParse.cpp index 6991242..29ffc38 100644 --- a/libdbpp/unittests/testParse.cpp +++ b/libdbpp/unittests/testParse.cpp @@ -10,7 +10,7 @@ #include using SQLs = std::vector; -BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(SQLs); +BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(SQLs) class RecordingParser : std::fstream, public DB::SqlParse { public: diff --git a/libdbpp/unittests/testPatch.cpp b/libdbpp/unittests/testPatch.cpp index e81f9d7..cc9fd24 100644 --- a/libdbpp/unittests/testPatch.cpp +++ b/libdbpp/unittests/testPatch.cpp @@ -48,11 +48,11 @@ public: } }; -BOOST_FIXTURE_TEST_SUITE(mock, Mock); +BOOST_FIXTURE_TEST_SUITE(mock, Mock) BOOST_AUTO_TEST_CASE(sanityFail) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.src = "source"; @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(sanityFail) BOOST_AUTO_TEST_CASE(noTx) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.src = "source"; @@ -73,12 +73,12 @@ BOOST_AUTO_TEST_CASE(noTx) BOOST_REQUIRE_THROW(db->patchTable(&tp), DB::TransactionRequired); } -BOOST_AUTO_TEST_SUITE_END(); +BOOST_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_CASE(testBasic) { Mock mock; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.src = "source"; @@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(testBasic) BOOST_AUTO_TEST_CASE(allKeys) { Mock mock; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.src = "source"; @@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE(allKeys) BOOST_AUTO_TEST_CASE(testOrder) { Mock mock; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; OrderByA order; @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE(testOrder) BOOST_AUTO_TEST_CASE(testWhere) { Mock mock; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; WhereAequals1 where; @@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(testWhere) BOOST_AUTO_TEST_CASE(testInstead) { Mock mock; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; MarkDeleted mark; @@ -197,7 +197,7 @@ BOOST_AUTO_TEST_CASE(testSrcExprTable) { Mock mock; DB::StaticSqlWriter s("source"); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.srcExpr = &s; @@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE(testSrcExprSelectTable) { Mock mock; DB::StaticSqlWriter s("(SELECT * FROM source)"); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.srcExpr = &s; @@ -248,7 +248,7 @@ BOOST_AUTO_TEST_CASE(testSrcExprSelectFilteredTable) { Mock mock; BindInt s("(SELECT s.* FROM source s WHERE s.a = ?)", 1); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); BOOST_REQUIRE(db); DB::TablePatch tp; tp.srcExpr = &s; diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp index cc5cdc3..8fb0510 100644 --- a/libdbpp/unittests/testUtils.cpp +++ b/libdbpp/unittests/testUtils.cpp @@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(stdforOverRowsStructuredBindingOptional) BOOST_AUTO_TEST_CASE(execute) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); db->execute("UPDATE forEachRow SET a = 2"); } @@ -123,7 +123,6 @@ BOOST_AUTO_TEST_CASE(columns) auto sel = db->select("SELECT a, b, c, d, e FROM forEachRow ORDER BY a LIMIT 1"); sel->execute(); BOOST_REQUIRE_THROW((void)(*sel)[5], DB::ColumnIndexOutOfRange); - BOOST_REQUIRE_THROW((void)(*sel)[-1], DB::ColumnIndexOutOfRange); BOOST_REQUIRE_EQUAL(0, (*sel)[0].colNo); BOOST_REQUIRE_EQUAL(4, (*sel)[4].colNo); BOOST_REQUIRE_EQUAL("c", (*sel)[2].name); @@ -167,7 +166,7 @@ BOOST_AUTO_TEST_CASE(extract) BOOST_AUTO_TEST_CASE(bulkLoadStream) { std::ifstream in(rootDir / "source.dat"); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); db->beginBulkUpload("bulk1", ""); BOOST_REQUIRE_EQUAL(56, db->bulkUploadData(in)); db->endBulkUpload(nullptr); @@ -179,7 +178,7 @@ BOOST_AUTO_TEST_CASE(bulkLoadStream) BOOST_AUTO_TEST_CASE(bulkLoadFile) { auto f = fopen((rootDir / "source.dat").c_str(), "r"); - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); db->beginBulkUpload("bulk2", ""); BOOST_REQUIRE_EQUAL(56, db->bulkUploadData(f)); db->endBulkUpload(nullptr); @@ -217,7 +216,7 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(nullBind, Str, StringTypes) BOOST_AUTO_TEST_CASE(iceNullBind) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); auto ins = db->modify("INSERT INTO forEachRow VALUES(?, ?, ?, ?, ?, ?)"); ins->bindParamI(0, IceUtil::Optional()); ins->bindParamF(1, IceUtil::Optional()); @@ -238,7 +237,7 @@ BOOST_AUTO_TEST_CASE(iceNullBind) BOOST_AUTO_TEST_CASE(charStarBindNull) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); db->modify("DELETE FROM forEachRow")->execute(); auto ins = db->modify("INSERT INTO forEachRow(a, c) VALUES(?, ?)"); char * cs = nullptr; @@ -265,16 +264,16 @@ BOOST_AUTO_TEST_CASE(charStarBindNull) BOOST_AUTO_TEST_CASE(bind) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); auto m = db->modify("doesn't matter, only testing compile"); - m->bindParamI(0, (unsigned char)1); - m->bindParamI(0, (char)1); - m->bindParamI(0, (time_t)1); + m->bindParamI(0, static_cast(1)); + m->bindParamI(0, static_cast(1)); + m->bindParamI(0, static_cast(1)); } BOOST_AUTO_TEST_CASE(bindIntPtr) { - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); db->modify("DELETE FROM forEachRow")->execute(); auto ins = db->modify("INSERT INTO forEachRow(a, b) VALUES(?, ?)"); int * is = nullptr; @@ -306,7 +305,7 @@ BOOST_AUTO_TEST_CASE(bindIntPtr) BOOST_FIXTURE_TEST_CASE(traits_bind, DB::TestCore) { using namespace std::literals; - auto db = DB::ConnectionPtr(DB::MockDatabase::openConnectionTo("pqmock")); + auto db = DB::MockDatabase::openConnectionTo("pqmock"); auto cmd = db->select("select x is null, format('%s', x) from (select ? x) d"); auto cmd2 = db->select("select x is null, x from (select ?::bytea x) d"); auto check = [](int line, const auto & v, bool isNull, const auto & testval, auto & cmd) { @@ -323,12 +322,12 @@ BOOST_FIXTURE_TEST_CASE(traits_bind, DB::TestCore) check(__LINE__, testInt, false, "43"sv, cmd); check(__LINE__, std::make_unique(testInt), false, "43"sv, cmd); check(__LINE__, std::unique_ptr(), true, ""sv, cmd); - check(__LINE__, (unsigned int)testInt, false, "43"sv, cmd); + check(__LINE__, static_cast(testInt), false, "43"sv, cmd); check(__LINE__, &testInt, false, "43"sv, cmd); check(__LINE__, testDouble, false, "3.14"sv, cmd); check(__LINE__, std::make_shared(testDouble), false, "3.14"sv, cmd); check(__LINE__, std::shared_ptr(), true, ""sv, cmd); - check(__LINE__, (float)testDouble, false, "3.14"sv, cmd); + check(__LINE__, static_cast(testDouble), false, "3.14"sv, cmd); check(__LINE__, &testDouble, false, "3.14"sv, cmd); check(__LINE__, testString, false, testString, cmd); check(__LINE__, &testString, false, testString, cmd); -- cgit v1.2.3