aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-21 14:42:59 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-21 18:35:50 +0200
commit1fa81ac5dc9259b7368e0487e0424c76bc87053e (patch)
treeb3d86c45c5e68d724de21b103eeeb98cafd30a9c /lib
parent5d29c23eb82d440163afffe3fd8f7f600149fd64 (diff)
downloadlibquotient-1fa81ac5dc9259b7368e0487e0424c76bc87053e.tar.gz
libquotient-1fa81ac5dc9259b7368e0487e0424c76bc87053e.zip
Fix a few clang-tidy/GCC warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/database.cpp10
-rw-r--r--lib/events/accountdataevents.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/database.cpp b/lib/database.cpp
index 193ff54e..ed7bd794 100644
--- a/lib/database.cpp
+++ b/lib/database.cpp
@@ -28,10 +28,10 @@ Database::Database(const QString& matrixId, const QString& deviceId, QObject* pa
database().open();
switch(version()) {
- case 0: migrateTo1();
- case 1: migrateTo2();
- case 2: migrateTo3();
- case 3: migrateTo4();
+ case 0: migrateTo1(); [[fallthrough]];
+ case 1: migrateTo2(); [[fallthrough]];
+ case 2: migrateTo3(); [[fallthrough]];
+ case 3: migrateTo4();
}
}
@@ -39,7 +39,7 @@ int Database::version()
{
auto query = execute(QStringLiteral("PRAGMA user_version;"));
if (query.next()) {
- bool ok;
+ bool ok = false;
int value = query.value(0).toInt(&ok);
qCDebug(DATABASE) << "Database version" << value;
if (ok)
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h
index ec2f64e3..24c3353c 100644
--- a/lib/events/accountdataevents.h
+++ b/lib/events/accountdataevents.h
@@ -32,7 +32,7 @@ struct JsonObjectConverter<TagRecord> {
if (orderJv.isDouble())
rec.order = fromJson<float>(orderJv);
if (orderJv.isString()) {
- bool ok;
+ bool ok = false;
rec.order = orderJv.toString().toFloat(&ok);
if (!ok)
rec.order = none;