summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:46:40 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-18 14:49:47 +0100
commit9b221b60484e62249868fcd7e1e57b9f86e677df (patch)
tree5857095e698950f32f2030a97c01f72b653b2953
parentAdd JT recommended warnings (diff)
downloadlibdbpp-9b221b60484e62249868fcd7e1e57b9f86e677df.tar.bz2
libdbpp-9b221b60484e62249868fcd7e1e57b9f86e677df.tar.xz
libdbpp-9b221b60484e62249868fcd7e1e57b9f86e677df.zip
Pass cppcheck and clang-tidy
-rw-r--r--Jamroot.jam2
-rw-r--r--libdbpp/column.h2
m---------libdbpp/unittests/libdbpp-odbc0
m---------libdbpp/unittests/libdbpp-postgresql0
m---------libdbpp/unittests/libdbpp-sqlite0
-rw-r--r--libdbpp/unittests/testUtils.cpp2
6 files changed, 6 insertions, 0 deletions
diff --git a/Jamroot.jam b/Jamroot.jam
index 51d89b0..ed164f9 100644
--- a/Jamroot.jam
+++ b/Jamroot.jam
@@ -42,6 +42,8 @@ project
<toolset>tidy:<checkxx>hicpp-*
<toolset>tidy:<xcheckxx>hicpp-named-parameter
<toolset>tidy:<checkxx>performance-*
+ <toolset>tidy:<librarydef>boost
+ <toolset>tidy:<librarydef>std
;
build-project libdbpp ;
diff --git a/libdbpp/column.h b/libdbpp/column.h
index 17f6223..f3c97be 100644
--- a/libdbpp/column.h
+++ b/libdbpp/column.h
@@ -22,7 +22,9 @@ namespace DB {
/// Abstract class for something that can handle field data. See Column::apply.
class DLL_PUBLIC HandleField {
public:
+ HandleField() = default;
virtual ~HandleField() = default;
+ SPECIAL_MEMBERS_DEFAULT(HandleField);
/// The field is null.
virtual void null() = 0;
diff --git a/libdbpp/unittests/libdbpp-odbc b/libdbpp/unittests/libdbpp-odbc
-Subproject dbf98a34e08558b91328cb414447e9961c22203
+Subproject 3eb8f4b130eb815aa3ff7cfbb89d05ebce21635
diff --git a/libdbpp/unittests/libdbpp-postgresql b/libdbpp/unittests/libdbpp-postgresql
-Subproject 216c87cbb7228d9130eead5e374dfd7a11a96b9
+Subproject 3e305e46d818a28a9c1cbb814bdc3dd72605d80
diff --git a/libdbpp/unittests/libdbpp-sqlite b/libdbpp/unittests/libdbpp-sqlite
-Subproject 7e5c360a8c8eee8ebe8b1c18e49be5b4af8dac5
+Subproject 5c72a2b6a0076d85ce12884bca3b1de89df4db1
diff --git a/libdbpp/unittests/testUtils.cpp b/libdbpp/unittests/testUtils.cpp
index 8fb0510..054ffb6 100644
--- a/libdbpp/unittests/testUtils.cpp
+++ b/libdbpp/unittests/testUtils.cpp
@@ -139,6 +139,7 @@ BOOST_AUTO_TEST_CASE(extract)
{
auto db = DB::MockDatabase::openConnectionTo("pqmock");
auto sel = db->select("SELECT a, b, c FROM forEachRow WHERE f");
+ // cppcheck-suppress assertWithSideEffect
BOOST_REQUIRE(sel->fetch());
int64_t lint;
double ldouble;
@@ -160,6 +161,7 @@ BOOST_AUTO_TEST_CASE(extract)
BOOST_REQUIRE_THROW((*sel)[2] >> ldouble, DB::InvalidConversion);
BOOST_REQUIRE_THROW((*sel)[1] >> lstring, DB::InvalidConversion);
BOOST_REQUIRE_THROW((*sel)[0] >> lstring, DB::InvalidConversion);
+ // cppcheck-suppress assertWithSideEffect
BOOST_REQUIRE(!sel->fetch());
}