[core,gateway] annotate bugprone-sizeof-expression

This commit is contained in:
akallabeth 2024-09-30 17:32:22 +02:00
parent cf7fd2d340
commit 1145eb0fc9
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -1837,6 +1837,7 @@ static BOOL rdg_process_control_packet(rdpRdg* rdg, int type, size_t packetLengt
if (packetLength < sizeof(RdgPacketHeader))
return FALSE;
// NOLINTNEXTLINE(bugprone-sizeof-expression)
WINPR_ASSERT(sizeof(RdgPacketHeader) < INT_MAX);
if (payloadSize)
@ -1923,6 +1924,7 @@ static int rdg_read_data_packet(rdpRdg* rdg, BYTE* buffer, int size)
if (!rdg->packetRemainingCount)
{
// NOLINTNEXTLINE(bugprone-sizeof-expression)
WINPR_ASSERT(sizeof(RdgPacketHeader) < INT_MAX);
while (readCount < sizeof(RdgPacketHeader))