Fix warnings
authorFelix Weilbach <felix.weilbach@nextcloud.com>
Fri, 10 Sep 2021 13:51:48 +0000 (15:51 +0200)
committerFelix Weilbach (Rebase PR Action) <felix.weilbach@t-online.de>
Fri, 17 Sep 2021 13:32:26 +0000 (13:32 +0000)
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
src/common/constants.h
src/common/preparedsqlquerymanager.h
src/csync/csync_exclude.cpp
src/gui/updater/updater.cpp
src/libsync/clientsideencryption.cpp
src/libsync/discovery.cpp
src/libsync/owncloudpropagator.cpp
src/libsync/propagatedownload.cpp

index 894a3778fcc74685c0f7c86f85c68db6e726a599..761a6cee15b163f25a16427cf6a6fe2fe93ff208 100644 (file)
@@ -19,5 +19,5 @@
 namespace OCC {
 namespace Constants {
     constexpr qint32 e2EeTagSize = 16;
-};
-};
+}
+}
index fa3cb4a4ae2b5a6b3fce88f845f0f1562a4d82e2..64cecabbd02d0957ae119ca4d64d3400516afbe8 100644 (file)
@@ -113,7 +113,7 @@ public:
 
 private:
     SqlQuery _queries[PreparedQueryCount];
-    Q_DISABLE_COPY(PreparedSqlQueryManager);
+    Q_DISABLE_COPY(PreparedSqlQueryManager)
 };
 
 }
index 84510252bf81a4d76b8c191125bf2860dc88f234..10f0b238acac388dec1a7ac9e61028ba0c164f9e 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "config_csync.h"
+#include <qglobal.h>
 
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE
@@ -201,7 +202,7 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(const QString &path, bool exclu
 
     /* Do not sync desktop.ini files anywhere in the tree. */
     const auto desktopIniFile = QStringLiteral("desktop.ini");
-    if (blen == static_cast<size_t>(desktopIniFile.length()) && bname.compare(desktopIniFile, Qt::CaseInsensitive) == 0) {
+    if (blen == static_cast<qsizetype>(desktopIniFile.length()) && bname.compare(desktopIniFile, Qt::CaseInsensitive) == 0) {
         return CSYNC_FILE_SILENTLY_EXCLUDED;
     }
 
index 21fd48b091f2b36b8e8474d7c5941a1424c853ba..af8fad47b26ca3bdd24c7391e8529496cbd28983 100644 (file)
@@ -118,7 +118,7 @@ QString Updater::getSystemInfo()
 {
 #ifdef Q_OS_LINUX
     QProcess process;
-    process.start(QLatin1String("lsb_release -a"));
+    process.start(QLatin1String("lsb_release"), { QStringLiteral("-a") });
     process.waitForFinished();
     QByteArray output = process.readAllStandardOutput();
     qCDebug(lcUpdater) << "Sys Info size: " << output.length();
index dd11ca90c844fb259ad2671245f8a8ded98a38ff..a5621409ad8b537011852f9379fb952b65cae677 100644 (file)
@@ -1958,4 +1958,4 @@ bool EncryptionHelper::StreamingDecryptor::isFinished() const
 {
     return _isFinished;
 }
-};
+}
index 7c58e17943c9dd808349fbcff7a282e675a9c6b2..88434229f8dab02fc613d1a2a46ceea7db2274a8 100644 (file)
@@ -507,7 +507,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
                 const bool isVfsModeOn = _discoveryData && _discoveryData->_syncOptions._vfs && _discoveryData->_syncOptions._vfs->mode() != Vfs::Off;
                 if (isVfsModeOn && dbEntry.isDirectory() && dbEntry._isE2eEncrypted) {
                     qint64 localFolderSize = 0;
-                    const auto listFilesCallback = [this, &localFolderSize](const OCC::SyncJournalFileRecord &record) {
+                    const auto listFilesCallback = [&localFolderSize](const OCC::SyncJournalFileRecord &record) {
                         if (record.isFile()) {
                             // add Constants::e2EeTagSize so we will know the size of E2EE file on the server
                             localFolderSize += record._fileSize + Constants::e2EeTagSize;
index 352ec32c2bd2668a114b38b834c0781e48733481..29dc5f23f0eac477951be90f8db9101c1943d558 100644 (file)
@@ -27,6 +27,7 @@
 #include "account.h"
 #include "common/asserts.h"
 #include "discoveryphase.h"
+#include "syncfileitem.h"
 
 #ifdef Q_OS_WIN
 #include <windef.h>
@@ -269,6 +270,7 @@ void PropagateItemJob::done(SyncFileItem::Status statusArg, const QString &error
     case SyncFileItem::NoStatus:
     case SyncFileItem::BlacklistedError:
     case SyncFileItem::FileLocked:
+    case SyncFileItem::FileNameInvalid:
         // nothing
         break;
     }
index cdda9abeb0cb7b87c8da1923a164ae48d5009ce1..e6b7383b9aa6055211d804ca45d849a7fe397c3a 100644 (file)
@@ -78,7 +78,6 @@ GETFileJob::GETFileJob(AccountPtr account, const QString &path, QIODevice *devic
     , _headers(headers)
     , _expectedEtagForResume(expectedEtagForResume)
     , _expectedContentLength(-1)
-    , _contentLength(-1)
     , _resumeStart(resumeStart)
     , _errorStatus(SyncFileItem::NoStatus)
     , _bandwidthLimited(false)
@@ -87,6 +86,7 @@ GETFileJob::GETFileJob(AccountPtr account, const QString &path, QIODevice *devic
     , _bandwidthManager(nullptr)
     , _hasEmittedFinishedSignal(false)
     , _lastModified()
+    , _contentLength(-1)
 {
 }
 
@@ -94,10 +94,10 @@ GETFileJob::GETFileJob(AccountPtr account, const QUrl &url, QIODevice *device,
     const QMap<QByteArray, QByteArray> &headers, const QByteArray &expectedEtagForResume,
     qint64 resumeStart, QObject *parent)
     : AbstractNetworkJob(account, url.toEncoded(), parent)
+    , _device(device)
     , _headers(headers)
     , _expectedEtagForResume(expectedEtagForResume)
     , _expectedContentLength(-1)
-    , _contentLength(-1)
     , _resumeStart(resumeStart)
     , _errorStatus(SyncFileItem::NoStatus)
     , _directDownloadUrl(url)
@@ -107,7 +107,7 @@ GETFileJob::GETFileJob(AccountPtr account, const QUrl &url, QIODevice *device,
     , _bandwidthManager(nullptr)
     , _hasEmittedFinishedSignal(false)
     , _lastModified()
-    , _device(device)
+    , _contentLength(-1)
 {
 }