Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamila San <hello@camila.codes>2020-05-29 16:07:05 +0300
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>2020-06-03 10:50:40 +0300
commit3bae570f29e8c53386d35b0d2f33cbe6b435c0c7 (patch)
tree93a231d526d0ae70fccb9000e4eeeedf0e423d7c /src/gui/updater
parente90eb9d717183776b3232bbe09b8e7907ca937c2 (diff)
Do not declare local variables without an initial value.
Signed-off-by: Camila San <hello@camila.codes>
Diffstat (limited to 'src/gui/updater')
-rw-r--r--src/gui/updater/ocupdater.cpp2
-rw-r--r--src/gui/updater/updateinfo.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp
index af7b7c2ed..18ef64e20 100644
--- a/src/gui/updater/ocupdater.cpp
+++ b/src/gui/updater/ocupdater.cpp
@@ -229,7 +229,7 @@ void OCUpdater::slotVersionInfoArrived()
QString xml = QString::fromUtf8(reply->readAll());
- bool ok;
+ bool ok = false;
_updateInfo = UpdateInfo::parseString(xml, &ok);
if (ok) {
versionInfoArrived(_updateInfo);
diff --git a/src/gui/updater/updateinfo.cpp b/src/gui/updater/updateinfo.cpp
index 48ab68bae..8af312307 100644
--- a/src/gui/updater/updateinfo.cpp
+++ b/src/gui/updater/updateinfo.cpp
@@ -93,7 +93,7 @@ UpdateInfo UpdateInfo::parseFile(const QString &filename, bool *ok)
}
QString errorMsg;
- int errorLine, errorCol;
+ int errorLine = 0, errorCol = 0;
QDomDocument doc;
if (!doc.setContent(&file, false, &errorMsg, &errorLine, &errorCol)) {
qCCritical(lcUpdater) << errorMsg << " at " << errorLine << "," << errorCol;
@@ -102,7 +102,7 @@ UpdateInfo UpdateInfo::parseFile(const QString &filename, bool *ok)
return UpdateInfo();
}
- bool documentOk;
+ bool documentOk = false;
UpdateInfo c = parseElement(doc.documentElement(), &documentOk);
if (ok) {
*ok = documentOk;
@@ -113,7 +113,7 @@ UpdateInfo UpdateInfo::parseFile(const QString &filename, bool *ok)
UpdateInfo UpdateInfo::parseString(const QString &xml, bool *ok)
{
QString errorMsg;
- int errorLine, errorCol;
+ int errorLine = 0, errorCol = 0;
QDomDocument doc;
if (!doc.setContent(xml, false, &errorMsg, &errorLine, &errorCol)) {
qCCritical(lcUpdater) << errorMsg << " at " << errorLine << "," << errorCol;
@@ -122,7 +122,7 @@ UpdateInfo UpdateInfo::parseString(const QString &xml, bool *ok)
return UpdateInfo();
}
- bool documentOk;
+ bool documentOk = false;
UpdateInfo c = parseElement(doc.documentElement(), &documentOk);
if (ok) {
*ok = documentOk;