Fixed sign-compare warnings

This commit is contained in:
Armin Novak 2019-02-07 14:20:24 +01:00
parent 0bacb30608
commit f4de82c242
2 changed files with 13 additions and 12 deletions

View File

@ -557,7 +557,7 @@ static int x11_shadow_query_cursor(x11ShadowSubsystem* subsystem, BOOL getImage)
y -= surface->y;
}
if ((x != subsystem->common.pointerX) || (y != subsystem->common.pointerY))
if ((x != (INT64)subsystem->common.pointerX) || (y != (INT64)subsystem->common.pointerY))
{
subsystem->common.pointerX = x;
subsystem->common.pointerY = y;
@ -719,7 +719,7 @@ static BOOL x11_shadow_check_resize(x11ShadowSubsystem* subsystem)
XGetWindowAttributes(subsystem->display, subsystem->root_window, &attr);
XUnlockDisplay(subsystem->display);
if (attr.width != subsystem->width || attr.height != subsystem->height)
if (attr.width != (INT64)subsystem->width || attr.height != (INT64)subsystem->height)
{
/* Screen size changed. Refresh monitor definitions and trigger screen resize */
subsystem->common.numMonitors = x11_shadow_enum_monitors(subsystem->common.monitors, 16);
@ -1176,8 +1176,8 @@ UINT32 x11_shadow_enum_monitors(MONITOR_DEF* monitors, UINT32 maxMonitors)
{
screens = XineramaQueryScreens(display, &numMonitors);
if (numMonitors > maxMonitors)
numMonitors = maxMonitors;
if (numMonitors > (INT64)maxMonitors)
numMonitors = (int)maxMonitors;
if (screens && (numMonitors > 0))
{
@ -1270,7 +1270,7 @@ static int x11_shadow_subsystem_init(rdpShadowSubsystem* sub)
{
pf = pfs + i;
if (pf->depth == subsystem->depth)
if (pf->depth == (INT64)subsystem->depth)
{
subsystem->bpp = pf->bits_per_pixel;
subsystem->scanline_pad = pf->scanline_pad;
@ -1295,7 +1295,7 @@ static int x11_shadow_subsystem_init(rdpShadowSubsystem* sub)
{
vi = vis + i;
if (vi->depth == subsystem->depth)
if (vi->depth == (INT64)subsystem->depth)
{
subsystem->visual = vi->visual;
break;

View File

@ -395,7 +395,7 @@ static INLINE void shadow_client_convert_rects(rdpShadowClient* client,
{
if (client->server->shareSubRect)
{
int i = 0;
UINT32 i = 0;
UINT16 offsetX = client->server->subRect.left;
UINT16 offsetY = client->server->subRect.top;
@ -1138,7 +1138,8 @@ static BOOL shadow_client_send_bitmap_update(rdpShadowClient* client,
BOOL ret = TRUE;
BYTE* data;
BYTE* buffer;
int yIdx, xIdx, k;
size_t k;
int yIdx, xIdx;
int rows, cols;
UINT32 DstSize;
UINT32 SrcFormat;
@ -1227,11 +1228,11 @@ static BOOL shadow_client_send_bitmap_update(rdpShadowClient* client,
bitmap->destLeft = nXSrc + (xIdx * 64);
bitmap->destTop = nYSrc + (yIdx * 64);
if ((bitmap->destLeft + bitmap->width) > (nXSrc + nWidth))
bitmap->width = (nXSrc + nWidth) - bitmap->destLeft;
if ((INT64)(bitmap->destLeft + bitmap->width) > (nXSrc + nWidth))
bitmap->width = (UINT32)(nXSrc + nWidth) - bitmap->destLeft;
if ((bitmap->destTop + bitmap->height) > (nYSrc + nHeight))
bitmap->height = (nYSrc + nHeight) - bitmap->destTop;
if ((INT64)(bitmap->destTop + bitmap->height) > (nYSrc + nHeight))
bitmap->height = (UINT32)(nYSrc + nHeight) - bitmap->destTop;
bitmap->destRight = bitmap->destLeft + bitmap->width - 1;
bitmap->destBottom = bitmap->destTop + bitmap->height - 1;