From 8c7953a47c4812bb6679f331a4ec9ca689904194 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Thu, 16 Oct 2014 11:20:21 +0200 Subject: [PATCH] ownSql: Proper initialization of result value plus assert on it. --- src/mirall/ownsql.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mirall/ownsql.cpp b/src/mirall/ownsql.cpp index 6a5ca35704..25735add30 100644 --- a/src/mirall/ownsql.cpp +++ b/src/mirall/ownsql.cpp @@ -159,7 +159,7 @@ bool SqlQuery::next() void SqlQuery::bindValue(int pos, const QVariant& value) { - int res; + int res = -1; if( _stmt ) { switch (value.type()) { case QVariant::Int: @@ -201,6 +201,7 @@ void SqlQuery::bindValue(int pos, const QVariant& value) break; } } } + Q_ASSERT( res == SQLITE_OK ); } QString SqlQuery::stringValue(int index)