Fix compiler error:

"orders.c", line 887: a cast does not yield an lvalue

Fix warnings:
"rdp.c", line 550: warning: integer overflow detected: op "<<"
"cache.c", line 42: warning: initializer does not fit or is out of range: -1


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@725 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2004-06-27 18:53:08 +00:00
parent 7f836f0384
commit e08ca4e7ac
3 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@ cache_remove_lru_bitmap(uint8 cache_id)
{ {
int i; int i;
uint16 cache_idx = 0; uint16 cache_idx = 0;
uint32 m = -1; uint32 m = (uint32)-1;
BMPCACHEENTRY *pbce; BMPCACHEENTRY *pbce;
for (i = 0; i < NUM_ELEMENTS(g_bmpcache[cache_id]); i++) for (i = 0; i < NUM_ELEMENTS(g_bmpcache[cache_id]); i++)

View File

@ -242,7 +242,7 @@ enum RDP_INPUT_DEVICE
#define RDP_CAPSET_BMPCACHE2 19 #define RDP_CAPSET_BMPCACHE2 19
#define RDP_CAPLEN_BMPCACHE2 0x28 #define RDP_CAPLEN_BMPCACHE2 0x28
#define BMPCACHE2_FLAG_PERSIST (1<<31) #define BMPCACHE2_FLAG_PERSIST ((uint32)1<<31)
#define RDP_SOURCE "MSTSC" #define RDP_SOURCE "MSTSC"

View File

@ -879,16 +879,16 @@ process_secondary_order(STREAM s)
/* The length isn't calculated correctly by the server. /* The length isn't calculated correctly by the server.
* For very compact orders the length becomes negative * For very compact orders the length becomes negative
* so a signed integer must be used. */ * so a signed integer must be used. */
sint16 length; uint16 length;
uint16 flags; uint16 flags;
uint8 type; uint8 type;
uint8 *next_order; uint8 *next_order;
in_uint16_le(s, (uint16) length); in_uint16_le(s, length);
in_uint16_le(s, flags); /* used by bmpcache2 */ in_uint16_le(s, flags); /* used by bmpcache2 */
in_uint8(s, type); in_uint8(s, type);
next_order = s->p + length + 7; next_order = s->p + (sint16)length + 7;
switch (type) switch (type)
{ {