From 627dd6681bc2f4ecd4c34eb0599ee9b65ac08537 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 24 Jun 2021 10:55:02 +0200 Subject: [PATCH] Sqlite: Fix warnings - use of uninitialized value - unused local typedef Change-Id: I60d6c3a9a04d9f603a102439582c9e55d85a191f Reviewed-by: Marco Bubke Reviewed-by: Qt CI Bot --- src/libs/sqlite/sqlitebasestatement.h | 2 +- tests/unit/unittest/sqlitestatement-test.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/sqlite/sqlitebasestatement.h b/src/libs/sqlite/sqlitebasestatement.h index e8e9026dae3..4966ee38450 100644 --- a/src/libs/sqlite/sqlitebasestatement.h +++ b/src/libs/sqlite/sqlitebasestatement.h @@ -213,7 +213,7 @@ public: auto value(const QueryTypes &...queryValues) { Resetter resetter{this}; - ResultType resultValue; + ResultType resultValue{}; bindValues(queryValues...); diff --git a/tests/unit/unittest/sqlitestatement-test.cpp b/tests/unit/unittest/sqlitestatement-test.cpp index 3804f8b31ed..fb25c9de4d7 100644 --- a/tests/unit/unittest/sqlitestatement-test.cpp +++ b/tests/unit/unittest/sqlitestatement-test.cpp @@ -1474,7 +1474,6 @@ TEST_F(SqliteStatement, ReadStatementOptionalValueWithTransactions) TEST_F(SqliteStatement, ReadStatementReadCallbackWithTransactions) { - using Tuple = std::tuple; MockFunction callbackMock; ReadStatement<3> statement("SELECT name, number, value FROM test WHERE name=? AND number=?", database); @@ -1541,7 +1540,6 @@ TEST_F(SqliteStatement, ReadWriteStatementOptionalValueWithTransactions) TEST_F(SqliteStatement, ReadWriteStatementReadCallbackWithTransactions) { - using Tuple = std::tuple; MockFunction callbackMock; ReadWriteStatement<3> statement( "SELECT name, number, value FROM test WHERE name=? AND number=?", database);