From 04629c1b92a163fe8cad496fa041b8eea72b61b0 Mon Sep 17 00:00:00 2001 From: Roland Bock Date: Sun, 22 Aug 2021 12:47:17 +0200 Subject: [PATCH] Fix warning --- tests/mysql/usage/PreparedTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/mysql/usage/PreparedTest.cpp b/tests/mysql/usage/PreparedTest.cpp index 3a484b49..e985f831 100644 --- a/tests/mysql/usage/PreparedTest.cpp +++ b/tests/mysql/usage/PreparedTest.cpp @@ -49,12 +49,11 @@ void testPreparedStatementResult (sql::connection& db) auto preparedSelectAll = db.prepare(sqlpp::select(count(tab.alpha)).from(tab).unconditionally()); auto preparedUpdateAll = db.prepare(sqlpp::update(tab).set(tab.gamma = false).unconditionally()); - uint32_t count = 0; { // explicit result scope // if results are released update should execute without exception auto result = db(preparedSelectAll); - count = result.front().count; + std::ignore = result.front().count; } db(preparedUpdateAll);