Fix two uninitialized variable uses reported by valgrind
==17988== Conditional jump or move depends on uninitialised value(s)
==17988== at 0x13839F3A: AccountsService::updateDemoEdges() (AccountsService.cpp:74)
==17988== by 0x13839DA5: AccountsService::setUser(QString const&) (AccountsService.cpp:45)
==17988== by 0x1383F67B: AccountsService::qt_metacall(QMetaObject::Call, int, void**) (moc_AccountsService.cpp:192)
==17988== by 0x496143D: StoreProperty(QV8Engine*, QObject*, QQmlPropertyData*, v8::Handle<v8::Value>) (in /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5.0.2)
==17988==
==17988== Conditional jump or move depends on uninitialised value(s)
==17988== at 0x1383A0F6: AccountsService::updateStatsWelcomeScreen() (AccountsService.cpp:92)
==17988== by 0x13839DB1: AccountsService::setUser(QString const&) (AccountsService.cpp:47)
==17988== by 0x1383F67B: AccountsService::qt_metacall(QMetaObject::Call, int, void**) (moc_AccountsService.cpp:192)
==17988== by 0x496143D: StoreProperty(QV8Engine*, QObject*, QQmlPropertyData*, v8::Handle<v8::Value>) (in /usr/lib/arm-linux-gnueabihf/libQt5Qml.so.5.0.2)
commit61093c8bec427c18678a519a8011d130cc2db807
authorAlbert Astals <albert.astals@canonical.com>
dateFri 11 Oct 2013, 15:43 (13 years ago)
parenta166127affab64
plugins/AccountsService/AccountsService.cpp+3−1
@@ -24,7 +24,9 @@
2424AccountsService::AccountsService(QObject* parent)
2525 : QObject(parent),
2626 m_service(new AccountsServiceDBusAdaptor(this)),
27− m_user(qgetenv("USER"))
27+ m_user(qgetenv("USER")),
28+ m_demoEdges(false),
29+ m_statsWelcomeScreen(false)
2830{
2931 connect(m_service, SIGNAL(propertiesChanged(const QString &, const QString &, const QStringList &)),
3032 this, SLOT(propertiesChanged(const QString &, const QString &, const QStringList &)));