From 34800459e7645fea3640214b5f7f6d7de183d332 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 17 Feb 2019 16:16:00 +0000 Subject: Enable hicpp checks and fix accordingly --- libmysqlpp/my-connection.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libmysqlpp/my-connection.cpp') diff --git a/libmysqlpp/my-connection.cpp b/libmysqlpp/my-connection.cpp index 8ab2d08..135ef34 100644 --- a/libmysqlpp/my-connection.cpp +++ b/libmysqlpp/my-connection.cpp @@ -59,7 +59,8 @@ NvpTarget(Opts) OptsTargetMap { }; -MySQL::Connection::Connection(const std::string & str) +MySQL::Connection::Connection(const std::string & str) : + conn({}) { std::stringstream i(str); Opts o; @@ -69,6 +70,7 @@ MySQL::Connection::Connection(const std::string & str) mysql_options(&conn, MYSQL_READ_DEFAULT_GROUP, ~o.options); } if (!mysql_real_connect(&conn, ~o.server, ~o.user, ~o.password, ~o.database, + // NOLINTNEXTLINE(hicpp-signed-bitwise) o.port, ~o.unix_socket, CLIENT_LOCAL_FILES | CLIENT_MULTI_STATEMENTS)) { throw ConnectionError(&conn); } @@ -142,11 +144,12 @@ MySQL::Connection::modify(const std::string & sql, const DB::CommandOptionsCPtr namespace MySQL { class LoadContext : public AdHoc::System::RuntimeContext { public: - LoadContext(MYSQL * c) : + explicit LoadContext(MYSQL * c) : loadBuf(nullptr), loadBufLen(0), bufOff(0), - conn(c) + conn(c), + loadReturn(0) { } -- cgit v1.2.3