From a517f7cbcaf37ae0003979382d4e6348f37b8b2d Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 18 Jan 2024 21:35:20 -0600 Subject: [PATCH] Fix -Wsign-compare warnings in debug build --- src/ControlStream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ControlStream.c b/src/ControlStream.c index 119a6c1..b3179fa 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -534,7 +534,7 @@ static bool encryptControlMessage(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket, PNVC packet->type = LE16(packet->type); packet->payloadLength = LE16(packet->payloadLength); - LC_ASSERT(ivSize <= sizeof(iv)); + LC_ASSERT(ivSize <= (int)sizeof(iv)); LC_ASSERT(ivSize == 12 || ivSize == 16); return PltEncryptMessage(encryptionCtx, ALGORITHM_AES_GCM, 0, (unsigned char*)StreamConfig.remoteInputAesKey, sizeof(StreamConfig.remoteInputAesKey), @@ -596,7 +596,7 @@ static bool decryptControlMessageToV1(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket, return false; } - LC_ASSERT(ivSize <= sizeof(iv)); + LC_ASSERT(ivSize <= (int)sizeof(iv)); LC_ASSERT(ivSize == 12 || ivSize == 16); if (!PltDecryptMessage(decryptionCtx, ALGORITHM_AES_GCM, 0, (unsigned char*)StreamConfig.remoteInputAesKey, sizeof(StreamConfig.remoteInputAesKey),