diff --git a/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp b/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp index df198cef5..78c568680 100644 --- a/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp +++ b/tests/auto/functional/orm/schema/schemabuilder/tst_schemabuilder.cpp @@ -473,7 +473,9 @@ QVariant tst_SchemaBuilder::getTableComment_Postgres(const QString &table, "select obj_description('%1.%2'::regclass) as table_comment") .arg(schema, table)); - Q_ASSERT(query.first()); + [[maybe_unused]] + const auto ok = query.first(); + Q_ASSERT(ok); Q_ASSERT(query.isValid()); return query.value(QStringLiteral("table_comment"));