[freerdp] fix argument consistency, casts

This commit is contained in:
Armin Novak
2025-03-19 16:36:37 +01:00
committed by akallabeth
parent df216c8e7e
commit e4df43a37a
20 changed files with 89 additions and 89 deletions

View File

@@ -55,13 +55,13 @@ extern "C"
(_bs->prefetch) = 0;
const intptr_t diff = _bs->pointer - _bs->buffer;
if ((diff + 4) < _bs->capacity)
if ((diff + 4) < (intptr_t)_bs->capacity)
(_bs->prefetch) |= ((UINT32)_bs->pointer[4] << 24);
if ((diff + 5) < _bs->capacity)
if ((diff + 5) < (intptr_t)_bs->capacity)
(_bs->prefetch) |= ((UINT32)_bs->pointer[5] << 16);
if ((diff + 6) < _bs->capacity)
if ((diff + 6) < (intptr_t)_bs->capacity)
(_bs->prefetch) |= ((UINT32)_bs->pointer[6] << 8);
if ((diff + 7) < _bs->capacity)
if ((diff + 7) < (intptr_t)_bs->capacity)
(_bs->prefetch) |= ((UINT32)_bs->pointer[7] << 0);
}
@@ -71,13 +71,13 @@ extern "C"
(_bs->accumulator) = 0;
const intptr_t diff = _bs->pointer - _bs->buffer;
if ((diff + 0) < _bs->capacity)
if ((diff + 0) < (intptr_t)_bs->capacity)
(_bs->accumulator) |= ((UINT32)_bs->pointer[0] << 24);
if ((diff + 1) < _bs->capacity)
if ((diff + 1) < (intptr_t)_bs->capacity)
(_bs->accumulator) |= ((UINT32)_bs->pointer[1] << 16);
if ((diff + 2) < _bs->capacity)
if ((diff + 2) < (intptr_t)_bs->capacity)
(_bs->accumulator) |= ((UINT32)_bs->pointer[2] << 8);
if ((diff + 3) < _bs->capacity)
if ((diff + 3) < (intptr_t)_bs->capacity)
(_bs->accumulator) |= ((UINT32)_bs->pointer[3] << 0);
BitStream_Prefetch(_bs);
}
@@ -86,14 +86,14 @@ extern "C"
{
WINPR_ASSERT(_bs);
const intptr_t diff = _bs->pointer - _bs->buffer;
if ((diff + 0) < _bs->capacity)
_bs->pointer[0] = (BYTE)((UINT32)_bs->accumulator >> 24);
if ((diff + 1) < _bs->capacity)
_bs->pointer[1] = (BYTE)((UINT32)_bs->accumulator >> 16);
if ((diff + 2) < _bs->capacity)
_bs->pointer[2] = (BYTE)((UINT32)_bs->accumulator >> 8);
if ((diff + 3) < _bs->capacity)
_bs->pointer[3] = (BYTE)((UINT32)_bs->accumulator >> 0);
if ((diff + 0) < (intptr_t)_bs->capacity)
_bs->pointer[0] = ((UINT32)_bs->accumulator >> 24) & 0xFF;
if ((diff + 1) < (intptr_t)_bs->capacity)
_bs->pointer[1] = ((UINT32)_bs->accumulator >> 16) & 0xFF;
if ((diff + 2) < (intptr_t)_bs->capacity)
_bs->pointer[2] = ((UINT32)_bs->accumulator >> 8) & 0xFF;
if ((diff + 3) < (intptr_t)_bs->capacity)
_bs->pointer[3] = ((UINT32)_bs->accumulator >> 0) & 0xFF;
}
static INLINE void BitStream_Shift(wBitStream* _bs, UINT32 _nbits)