diff --git a/tests/unit/tests/printers/gtest-creator-printing.cpp b/tests/unit/tests/printers/gtest-creator-printing.cpp index a8c4e17445b..25bb4d18d90 100644 --- a/tests/unit/tests/printers/gtest-creator-printing.cpp +++ b/tests/unit/tests/printers/gtest-creator-printing.cpp @@ -221,6 +221,7 @@ std::ostream &operator<<(std::ostream &out, const ValueView &value) } namespace { +[[maybe_unused]] Utils::SmallStringView operationText(int operation) { switch (operation) { @@ -235,9 +236,9 @@ Utils::SmallStringView operationText(int operation) return {}; } -std::ostream &operator<<(std::ostream &out, sqlite3_changeset_iter *iter) -{ #if 0 +std::ostream &operator<<(std::ostream &out, [[maybe_unused]] sqlite3_changeset_iter *iter) +{ out << "("; const char *tableName = nullptr; @@ -280,9 +281,9 @@ std::ostream &operator<<(std::ostream &out, sqlite3_changeset_iter *iter) } out << "})"; -#endif return out; } +#endif const char *toText(Operation operation) { @@ -315,7 +316,7 @@ const char *toText(LockingMode lockingMode) } } // namespace -std::ostream &operator<<(std::ostream &out, const SessionChangeSet &changeset) +std::ostream &operator<<(std::ostream &out, [[maybe_unused]] const SessionChangeSet &changeset) { #if 0 sqlite3_changeset_iter *iter = nullptr; diff --git a/tests/unit/tests/unittests/model/modelutils-test.cpp b/tests/unit/tests/unittests/model/modelutils-test.cpp index 7423649296a..4418d36ac83 100644 --- a/tests/unit/tests/unittests/model/modelutils-test.cpp +++ b/tests/unit/tests/unittests/model/modelutils-test.cpp @@ -83,11 +83,11 @@ TEST_F(ModelUtils, component_file_path_for_invalid_node_is_empty) TEST_F(ModelUtils, component_file_path_for_node_without_metainfo_is_empty) { - auto typeId = projectStorageMock.createType(moduleId, - "Foo", - QmlDesigner::Storage::TypeTraits::IsFileComponent, - {}, - sourceId); + projectStorageMock.createType(moduleId, + "Foo", + QmlDesigner::Storage::TypeTraits::IsFileComponent, + {}, + sourceId); auto node = model.createModelNode("Foo"); auto path = QmlDesigner::ModelUtils::componentFilePath(node);