diff --git a/tests/unit/test_lowpan.cpp b/tests/unit/test_lowpan.cpp index 2872e1a2b..1c01f254d 100644 --- a/tests/unit/test_lowpan.cpp +++ b/tests/unit/test_lowpan.cpp @@ -220,7 +220,7 @@ static void Test(TestIphcVector &aVector, bool aCompress, bool aDecompress) { // Append payload to the IPv6 Packet. memcpy(result + message->GetLength(), iphc + decompressedBytes, - iphcLength - decompressedBytes); + iphcLength - static_cast(decompressedBytes)); printf("Resulted IPv6 uncompressed packet: \n"); otTestPrintHex(result, message->GetLength() + iphcLength - decompressedBytes);