Don't compare integers with different signs

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
This commit is contained in:
Felix Weilbach 2021-07-23 17:47:05 +02:00 committed by Matthieu Gallien (Rebase PR Action)
parent acf6cc0527
commit ccd27870a7
4 changed files with 9 additions and 8 deletions

View file

@ -125,7 +125,7 @@ std::unique_ptr<csync_file_stat_t> csync_vio_local_readdir(csync_vio_handle_t *h
// Directly modifies file_stat->type.
// We can ignore the return value since we're done here anyway.
const auto result = vfs->statTypeVirtualFile(file_stat.get(), &handle->path);
Q_UNUSED(result);
Q_UNUSED(result)
}
return file_stat;

View file

@ -79,7 +79,7 @@ void User::showDesktopNotification(const QString &title, const QString &message)
}
// after one hour, clear the gui log notification store
constexpr quint64 clearGuiLogInterval = 60 * 60 * 1000;
constexpr qint64 clearGuiLogInterval = 60 * 60 * 1000;
if (_guiLogTimer.elapsed() > clearGuiLogInterval) {
_notificationCache.clear();
}

View file

@ -1,6 +1,7 @@
#include <QLoggingCategory>
#include <QSignalSpy>
#include <QTest>
#include <cstdint>
#include <functional>
#include "pushnotificationstestutils.h"
@ -116,15 +117,15 @@ uint32_t FakeWebSocketServer::textMessagesCount() const
return _processTextMessageSpy->count();
}
QString FakeWebSocketServer::textMessage(uint32_t messageNumber) const
QString FakeWebSocketServer::textMessage(int messageNumber) const
{
Q_ASSERT(messageNumber < _processTextMessageSpy->count());
Q_ASSERT(0 <= messageNumber && messageNumber < _processTextMessageSpy->count());
return _processTextMessageSpy->at(messageNumber).at(1).toString();
}
QWebSocket *FakeWebSocketServer::socketForTextMessage(uint32_t messageNumber) const
QWebSocket *FakeWebSocketServer::socketForTextMessage(int messageNumber) const
{
Q_ASSERT(messageNumber < _processTextMessageSpy->count());
Q_ASSERT(0 <= messageNumber && messageNumber < _processTextMessageSpy->count());
return _processTextMessageSpy->at(messageNumber).at(0).value<QWebSocket *>();
}

View file

@ -40,9 +40,9 @@ public:
uint32_t textMessagesCount() const;
QString textMessage(uint32_t messageNumber) const;
QString textMessage(int messageNumber) const;
QWebSocket *socketForTextMessage(uint32_t messageNumber) const;
QWebSocket *socketForTextMessage(int messageNumber) const;
void clearTextMessages();