From 467b01f494a4a83e06437f692fef0dc11875312d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 23 Jun 2023 16:01:14 +0200 Subject: [PATCH] http2: fix potential warning about narrowing By passing both arguments as qint64, then casting to qint32. Since one of the arguments are qint32, the result will fit in qint32. Change-Id: I98e9b1484549fa5dad340f02eda1b341cf6b293d Reviewed-by: Edward Welbourne Reviewed-by: Ahmad Samir Reviewed-by: Konrad Kujawa --- src/network/access/qhttp2protocolhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qhttp2protocolhandler.cpp b/src/network/access/qhttp2protocolhandler.cpp index 93be8412db..86da7543e4 100644 --- a/src/network/access/qhttp2protocolhandler.cpp +++ b/src/network/access/qhttp2protocolhandler.cpp @@ -504,7 +504,7 @@ bool QHttp2ProtocolHandler::sendDATA(Stream &stream) } frameWriter.start(FrameType::DATA, FrameFlag::EMPTY, stream.streamID); - const qint32 bytesWritten = std::min(slot, chunkSize); + const qint32 bytesWritten = qint32(std::min(slot, chunkSize)); if (!frameWriter.writeDATA(*m_socket, maxFrameSize, src, bytesWritten)) return false;