From 929feb754ba93bf1064f9995c964fe19b39a66f3 Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Sun, 5 May 2024 14:20:41 +0300 Subject: [PATCH] Fix CI warnings --- src/xmpp/xmpp-im/jingle-ft.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xmpp/xmpp-im/jingle-ft.cpp b/src/xmpp/xmpp-im/jingle-ft.cpp index ef48dec6..25255d6f 100644 --- a/src/xmpp/xmpp-im/jingle-ft.cpp +++ b/src/xmpp/xmpp-im/jingle-ft.cpp @@ -277,13 +277,13 @@ namespace XMPP { namespace Jingle { namespace FileTransfer { return; // we will come back on readyRead } data.resize(sz); - sz = device->read(data.data(), sz); - if (sz == -1) { + auto readSz = device->read(data.data(), sz); + if (readSz < 0) { handleStreamFail(QString::fromLatin1("source device failed")); return; } - data.resize(sz); - if (sz == 0) { + data.resize(readSz); + if (readSz == 0) { if (!bytesLeft) { lastReason = Reason(Reason::Condition::Success); if (hasher) { @@ -423,7 +423,7 @@ namespace XMPP { namespace Jingle { namespace FileTransfer { writeLoggingStarted = true; } auto bs = getBlockSize(); - if (q->pad()->session()->role() == q->senders() && connection->bytesToWrite() < bs) { + if (q->pad()->session()->role() == q->senders() && quint64(connection->bytesToWrite()) < bs) { writeNextBlockToTransport(); } },