diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-03 14:21:54 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-14 11:10:28 +0200 |
commit | ca1a8d80f162d26bd280a7c05f0553946a06117e (patch) | |
tree | 9ca811768441fbf31de6a979dda7e0860d2ca062 /src | |
parent | cae4f72585f06023efc28e00d4341c87864e5961 (diff) |
Fix warnings
- qcoapprotocol.cpp:387: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int')
- tst_qcoapclient.cpp:365: implicit conversion loses integer precision: 'int' to 'quint16' (aka 'unsigned short')
- tst_qcoapclient.cpp:502: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int')
- tst_qcoapclient.cpp:504: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int')
Change-Id: I5bec42fc69925f04641285c6473d9ddc3ba6ec56
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/coap/qcoapprotocol.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coap/qcoapprotocol.cpp b/src/coap/qcoapprotocol.cpp index e5b7895..30ee188 100644 --- a/src/coap/qcoapprotocol.cpp +++ b/src/coap/qcoapprotocol.cpp @@ -383,8 +383,8 @@ void QCoapProtocolPrivate::onFrameReceived(const QByteArray &data, const QHostAd } // Send next block, ask for next block, or process the final reply - if (reply->hasMoreBlocksToSend()) { - request->setToSendBlock(reply->nextBlockToSend(), blockSize); + if (reply->hasMoreBlocksToSend() && reply->nextBlockToSend() >= 0) { + request->setToSendBlock(static_cast<uint>(reply->nextBlockToSend()), blockSize); request->setMessageId(generateUniqueMessageId()); sendRequest(request); } else if (reply->hasMoreBlocksToReceive()) { |