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 <edward.welbourne@qt.io> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
This commit is contained in:
parent
49d177cfba
commit
467b01f494
@ -504,7 +504,7 @@ bool QHttp2ProtocolHandler::sendDATA(Stream &stream)
|
||||
}
|
||||
|
||||
frameWriter.start(FrameType::DATA, FrameFlag::EMPTY, stream.streamID);
|
||||
const qint32 bytesWritten = std::min<qint32>(slot, chunkSize);
|
||||
const qint32 bytesWritten = qint32(std::min<qint64>(slot, chunkSize));
|
||||
|
||||
if (!frameWriter.writeDATA(*m_socket, maxFrameSize, src, bytesWritten))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user