channels/rdpei: fix warnings

This commit is contained in:
Marc-André Moreau 2013-05-14 22:01:36 -04:00
parent c3efeccbd6
commit 0ee55ddcfe
1 changed files with 10 additions and 11 deletions

View File

@ -407,7 +407,7 @@ BOOL rdpei_read_8byte_unsigned(wStream* s, UINT64* value)
break; break;
case 4: case 4:
*value = (byte & 0x1F) << 32; *value = ((UINT64) (byte & 0x1F)) << 32;
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 24); *value |= (byte << 24);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
@ -419,9 +419,9 @@ BOOL rdpei_read_8byte_unsigned(wStream* s, UINT64* value)
break; break;
case 5: case 5:
*value = (byte & 0x1F) << 40; *value = ((UINT64) (byte & 0x1F)) << 40;
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 32); *value |= (((UINT64) byte) << 32);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 24); *value |= (byte << 24);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
@ -433,11 +433,11 @@ BOOL rdpei_read_8byte_unsigned(wStream* s, UINT64* value)
break; break;
case 6: case 6:
*value = (byte & 0x1F) << 48; *value = ((UINT64) (byte & 0x1F)) << 48;
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 40); *value |= (((UINT64) byte) << 40);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 32); *value |= (((UINT64) byte) << 32);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 24); *value |= (byte << 24);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
@ -449,13 +449,13 @@ BOOL rdpei_read_8byte_unsigned(wStream* s, UINT64* value)
break; break;
case 7: case 7:
*value = (byte & 0x1F) << 56; *value = ((UINT64) (byte & 0x1F)) << 56;
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 48); *value |= (((UINT64) byte) << 48);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 40); *value |= (((UINT64) byte) << 40);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 32); *value |= (((UINT64) byte) << 32);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
*value |= (byte << 24); *value |= (byte << 24);
Stream_Read_UINT8(s, byte); Stream_Read_UINT8(s, byte);
@ -476,7 +476,6 @@ BOOL rdpei_read_8byte_unsigned(wStream* s, UINT64* value)
BOOL rdpei_write_8byte_unsigned(wStream* s, UINT64 value) BOOL rdpei_write_8byte_unsigned(wStream* s, UINT64 value)
{ {
BYTE byte; BYTE byte;
BYTE count;
if (value <= 0x1F) if (value <= 0x1F)
{ {