wfreerdp: fix compilation and warnings

This commit is contained in:
Marc-André Moreau 2011-12-03 17:24:18 -05:00
parent b93b196e82
commit a50ef84c21
14 changed files with 100 additions and 89 deletions

View File

@ -182,7 +182,7 @@ void wf_toggle_fullscreen(wfInfo* wfi)
SetForegroundWindow(wfi->hwnd);
}
void wf_gdi_palette_update(rdpUpdate* update, PALETTE_UPDATE* palette)
void wf_gdi_palette_update(rdpContext* context, PALETTE_UPDATE* palette)
{
}
@ -200,10 +200,10 @@ void wf_set_clip_rgn(wfInfo* wfi, int x, int y, int width, int height)
DeleteObject(clip);
}
void wf_gdi_set_bounds(rdpUpdate* update, BOUNDS* bounds)
void wf_gdi_set_bounds(rdpContext* context, rdpBounds* bounds)
{
HRGN hrgn;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
if (bounds != NULL)
{
@ -217,9 +217,9 @@ void wf_gdi_set_bounds(rdpUpdate* update, BOUNDS* bounds)
}
}
void wf_gdi_dstblt(rdpUpdate* update, DSTBLT_ORDER* dstblt)
void wf_gdi_dstblt(rdpContext* context, DSTBLT_ORDER* dstblt)
{
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
BitBlt(wfi->drawing->hdc, dstblt->nLeftRect, dstblt->nTopRect,
dstblt->nWidth, dstblt->nHeight, NULL, 0, 0, gdi_rop3_code(dstblt->bRop));
@ -228,7 +228,7 @@ void wf_gdi_dstblt(rdpUpdate* update, DSTBLT_ORDER* dstblt)
dstblt->nWidth, dstblt->nHeight);
}
void wf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
void wf_gdi_patblt(rdpContext* context, PATBLT_ORDER* patblt)
{
HBRUSH brush;
HBRUSH org_brush;
@ -237,7 +237,7 @@ void wf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
uint32 bgcolor;
COLORREF org_bkcolor;
COLORREF org_textcolor;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
fgcolor = freerdp_color_convert(patblt->foreColor, wfi->srcBpp, 24, wfi->clrconv);
bgcolor = freerdp_color_convert(patblt->backColor, wfi->srcBpp, 24, wfi->clrconv);
@ -262,9 +262,9 @@ void wf_gdi_patblt(rdpUpdate* update, PATBLT_ORDER* patblt)
wf_invalidate_region(wfi, patblt->nLeftRect, patblt->nTopRect, patblt->nWidth, patblt->nHeight);
}
void wf_gdi_scrblt(rdpUpdate* update, SCRBLT_ORDER* scrblt)
void wf_gdi_scrblt(rdpContext* context, SCRBLT_ORDER* scrblt)
{
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
BitBlt(wfi->drawing->hdc, scrblt->nLeftRect, scrblt->nTopRect,
scrblt->nWidth, scrblt->nHeight, wfi->primary->hdc,
@ -274,12 +274,12 @@ void wf_gdi_scrblt(rdpUpdate* update, SCRBLT_ORDER* scrblt)
scrblt->nWidth, scrblt->nHeight);
}
void wf_gdi_opaque_rect(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect)
void wf_gdi_opaque_rect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect)
{
RECT rect;
HBRUSH brush;
uint32 brush_color;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
brush_color = freerdp_color_convert(opaque_rect->color, wfi->srcBpp, 24, wfi->clrconv);
@ -295,16 +295,16 @@ void wf_gdi_opaque_rect(rdpUpdate* update, OPAQUE_RECT_ORDER* opaque_rect)
wf_invalidate_region(wfi, rect.left, rect.top, rect.right - rect.left + 1, rect.bottom - rect.top + 1);
}
void wf_gdi_multi_opaque_rect(rdpUpdate* update, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
void wf_gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect)
{
int i;
RECT rect;
HBRUSH brush;
uint32 brush_color;
DELTA_RECT* rectangle;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
for (i = 1; i < multi_opaque_rect->numRectangles + 1; i++)
for (i = 1; i < (int) multi_opaque_rect->numRectangles + 1; i++)
{
rectangle = &multi_opaque_rect->rectangles[i];
@ -326,13 +326,13 @@ void wf_gdi_multi_opaque_rect(rdpUpdate* update, MULTI_OPAQUE_RECT_ORDER* multi_
}
}
void wf_gdi_line_to(rdpUpdate* update, LINE_TO_ORDER* line_to)
void wf_gdi_line_to(rdpContext* context, LINE_TO_ORDER* line_to)
{
HPEN pen;
HPEN org_pen;
int x, y, w, h;
uint32 pen_color;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
pen_color = freerdp_color_convert(line_to->penColor, wfi->srcBpp, wfi->dstBpp, wfi->clrconv);
@ -356,7 +356,7 @@ void wf_gdi_line_to(rdpUpdate* update, LINE_TO_ORDER* line_to)
DeleteObject(pen);
}
void wf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
void wf_gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
{
int i;
POINT* pts;
@ -364,7 +364,7 @@ void wf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
HPEN hpen;
HPEN org_hpen;
uint32 pen_color;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
pen_color = freerdp_color_convert(polyline->penColor, wfi->srcBpp, wfi->dstBpp, wfi->clrconv);
@ -376,7 +376,7 @@ void wf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
{
pts = (POINT*) xmalloc(sizeof(POINT) * polyline->numPoints);
for (i = 0; i < polyline->numPoints; i++)
for (i = 0; i < (int) polyline->numPoints; i++)
{
pts[i].x = polyline->points[i].x;
pts[i].y = polyline->points[i].y;
@ -394,10 +394,10 @@ void wf_gdi_polyline(rdpUpdate* update, POLYLINE_ORDER* polyline)
DeleteObject(hpen);
}
void wf_gdi_memblt(rdpUpdate* update, MEMBLT_ORDER* memblt)
void wf_gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
{
wfBitmap* bitmap;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
bitmap = (wfBitmap*) memblt->bitmap;
@ -409,22 +409,22 @@ void wf_gdi_memblt(rdpUpdate* update, MEMBLT_ORDER* memblt)
wf_invalidate_region(wfi, memblt->nLeftRect, memblt->nTopRect, memblt->nWidth, memblt->nHeight);
}
void wf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_command)
void wf_gdi_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND* surface_bits_command)
{
int i, j;
int tx, ty;
char* tile_bitmap;
RFX_MESSAGE* message;
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
RFX_CONTEXT* context = (RFX_CONTEXT*) wfi->rfx_context;
NSC_CONTEXT* ncontext = (NSC_CONTEXT*) wfi->nsc_context;
RFX_CONTEXT* rfx_context = (RFX_CONTEXT*) wfi->rfx_context;
NSC_CONTEXT* nsc_context = (NSC_CONTEXT*) wfi->nsc_context;
tile_bitmap = (char*) xzalloc(32);
if (surface_bits_command->codecID == CODEC_ID_REMOTEFX)
{
message = rfx_process_message(context, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
message = rfx_process_message(rfx_context, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
/* blit each tile */
for (i = 0; i < message->num_tiles; i++)
@ -446,20 +446,20 @@ void wf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
}
wf_set_null_clip_rgn(wfi);
rfx_message_free(context, message);
rfx_message_free(rfx_context, message);
}
else if (surface_bits_command->codecID == CODEC_ID_NSCODEC)
{
ncontext->width = surface_bits_command->width;
ncontext->height = surface_bits_command->height;
nsc_process_message(ncontext, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
nsc_context->width = surface_bits_command->width;
nsc_context->height = surface_bits_command->height;
nsc_process_message(nsc_context, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
wfi->image->_bitmap.width = surface_bits_command->width;
wfi->image->_bitmap.height = surface_bits_command->height;
wfi->image->_bitmap.bpp = surface_bits_command->bpp;
wfi->image->_bitmap.data = (uint8*) xrealloc(wfi->image->_bitmap.data, wfi->image->_bitmap.width * wfi->image->_bitmap.height * 4);
freerdp_image_flip(ncontext->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
freerdp_image_flip(nsc_context->bmpdata, wfi->image->_bitmap.data, wfi->image->_bitmap.width, wfi->image->_bitmap.height, 32);
BitBlt(wfi->primary->hdc, surface_bits_command->destLeft, surface_bits_command->destTop, surface_bits_command->width, surface_bits_command->height, wfi->image->hdc, 0, 0, GDI_SRCCOPY);
nsc_context_destroy(ncontext);
nsc_context_destroy(nsc_context);
}
else if (surface_bits_command->codecID == CODEC_ID_NONE)
{
@ -506,30 +506,33 @@ void wf_gdi_surface_bits(rdpUpdate* update, SURFACE_BITS_COMMAND* surface_bits_c
void wf_gdi_register_update_callbacks(rdpUpdate* update)
{
rdpPrimaryUpdate* primary = update->primary;
update->Palette = wf_gdi_palette_update;
update->SetBounds = wf_gdi_set_bounds;
update->DstBlt = wf_gdi_dstblt;
update->PatBlt = wf_gdi_patblt;
update->ScrBlt = wf_gdi_scrblt;
update->OpaqueRect = wf_gdi_opaque_rect;
update->DrawNineGrid = NULL;
update->MultiDstBlt = NULL;
update->MultiPatBlt = NULL;
update->MultiScrBlt = NULL;
update->MultiOpaqueRect = wf_gdi_multi_opaque_rect;
update->MultiDrawNineGrid = NULL;
update->LineTo = wf_gdi_line_to;
update->Polyline = wf_gdi_polyline;
update->MemBlt = wf_gdi_memblt;
update->Mem3Blt = NULL;
update->SaveBitmap = NULL;
update->GlyphIndex = NULL;
update->FastIndex = NULL;
update->FastGlyph = NULL;
update->PolygonSC = NULL;
update->PolygonCB = NULL;
update->EllipseSC = NULL;
update->EllipseCB = NULL;
primary->DstBlt = wf_gdi_dstblt;
primary->PatBlt = wf_gdi_patblt;
primary->ScrBlt = wf_gdi_scrblt;
primary->OpaqueRect = wf_gdi_opaque_rect;
primary->DrawNineGrid = NULL;
primary->MultiDstBlt = NULL;
primary->MultiPatBlt = NULL;
primary->MultiScrBlt = NULL;
primary->MultiOpaqueRect = wf_gdi_multi_opaque_rect;
primary->MultiDrawNineGrid = NULL;
primary->LineTo = wf_gdi_line_to;
primary->Polyline = wf_gdi_polyline;
primary->MemBlt = wf_gdi_memblt;
primary->Mem3Blt = NULL;
primary->SaveBitmap = NULL;
primary->GlyphIndex = NULL;
primary->FastIndex = NULL;
primary->FastGlyph = NULL;
primary->PolygonSC = NULL;
primary->PolygonCB = NULL;
primary->EllipseSC = NULL;
primary->EllipseCB = NULL;
update->SurfaceBits = wf_gdi_surface_bits;
}

View File

@ -69,14 +69,14 @@ int wf_create_console(void)
return 0;
}
void wf_sw_begin_paint(rdpUpdate* update)
void wf_sw_begin_paint(rdpContext* context)
{
rdpGdi* gdi = update->context->gdi;
rdpGdi* gdi = context->gdi;
gdi->primary->hdc->hwnd->invalid->null = 1;
gdi->primary->hdc->hwnd->ninvalid = 0;
}
void wf_sw_end_paint(rdpUpdate* update)
void wf_sw_end_paint(rdpContext* context)
{
int i;
rdpGdi* gdi;
@ -87,8 +87,8 @@ void wf_sw_end_paint(rdpUpdate* update)
RECT update_rect;
HGDI_RGN cinvalid;
gdi = update->context->gdi;
wfi = ((wfContext*) update->context)->wfi;
gdi = context->gdi;
wfi = ((wfContext*) context)->wfi;
if (gdi->primary->hdc->hwnd->ninvalid < 1)
return;
@ -112,14 +112,14 @@ void wf_sw_end_paint(rdpUpdate* update)
}
}
void wf_hw_begin_paint(rdpUpdate* update)
void wf_hw_begin_paint(rdpContext* context)
{
wfInfo* wfi = ((wfContext*) update->context)->wfi;
wfInfo* wfi = ((wfContext*) context)->wfi;
wfi->hdc->hwnd->invalid->null = 1;
wfi->hdc->hwnd->ninvalid = 0;
}
void wf_hw_end_paint(rdpUpdate* update)
void wf_hw_end_paint(rdpContext* context)
{
}

View File

@ -22,6 +22,10 @@
#include <freerdp/types.h>
#ifdef _WIN32
#include <Windows.h>
#endif
/* Window Order Header Flags */
#define WINDOW_ORDER_TYPE_WINDOW 0x01000000
#define WINDOW_ORDER_TYPE_NOTIFY 0x02000000

View File

@ -97,7 +97,7 @@ void update_gdi_bitmap_update(rdpContext* context, BITMAP_UPDATE* bitmap_update)
bitmap = cache->bitmap->bitmap;
for (i = 0; i < bitmap_update->number; i++)
for (i = 0; i < (int) bitmap_update->number; i++)
{
bitmap_data = &bitmap_update->rectangles[i];
@ -216,7 +216,7 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings)
bitmap_cache->cells = (BITMAP_V2_CELL*) xzalloc(sizeof(BITMAP_V2_CELL) * bitmap_cache->maxCells);
for (i = 0; i < bitmap_cache->maxCells; i++)
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries;
bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number);
@ -233,7 +233,7 @@ void bitmap_cache_free(rdpBitmapCache* bitmap_cache)
if (bitmap_cache != NULL)
{
for (i = 0; i < bitmap_cache->maxCells; i++)
for (i = 0; i < (int) bitmap_cache->maxCells; i++)
{
for (j = 0; j < (int) bitmap_cache->cells[i].number; j++)
{

View File

@ -86,7 +86,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
else
Glyph_BeginDraw(context, 0, 0, 0, 0, bgcolor, fgcolor);
while (index < length)
while (index < (int) length)
{
switch (data[index])
{
@ -94,7 +94,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
printf("GLYPH_FRAGMENT_USE\n");
if (index + 2 > length)
if (index + 2 > (int) length)
{
/* at least one byte need to follow */
index = length = 0;
@ -114,13 +114,13 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
x += data[index + 2];
}
for (n = 0; n < size; n++)
for (n = 0; n < (int) size; n++)
{
update_process_glyph(context, fragments, &n, &x, &y, cacheId, ulCharInc, flAccel);
}
}
index += (index + 2 < length) ? 3 : 2;
index += (index + 2 < (int) length) ? 3 : 2;
length -= index;
data = &(data[index]);
index = 0;
@ -131,7 +131,7 @@ void update_process_glyph_fragments(rdpContext* context, uint8* data, uint32 len
printf("GLYPH_FRAGMENT_ADD\n");
if (index + 3 > length)
if (index + 3 > (int) length)
{
/* at least two bytes need to follow */
index = length = 0;
@ -309,7 +309,7 @@ void update_gdi_cache_glyph(rdpContext* context, CACHE_GLYPH_ORDER* cache_glyph)
GLYPH_DATA* glyph_data;
rdpCache* cache = context->cache;
for (i = 0; i < cache_glyph->cGlyphs; i++)
for (i = 0; i < (int) cache_glyph->cGlyphs; i++)
{
glyph_data = cache_glyph->glyphData[i];

View File

@ -42,7 +42,7 @@ void update_gdi_create_offscreen_bitmap(rdpContext* context, CREATE_OFFSCREEN_BI
if(cache->offscreen->currentSurface == create_offscreen_bitmap->id)
Bitmap_SetSurface(context, bitmap, false);
for (i = 0; i < create_offscreen_bitmap->deleteList.cIndices; i++)
for (i = 0; i < (int) create_offscreen_bitmap->deleteList.cIndices; i++)
{
index = create_offscreen_bitmap->deleteList.indices[i];
offscreen_cache_delete(cache->offscreen, index);
@ -155,7 +155,7 @@ void offscreen_cache_free(rdpOffscreenCache* offscreen_cache)
if (offscreen_cache != NULL)
{
for (i = 0; i < offscreen_cache->maxEntries; i++)
for (i = 0; i < (int) offscreen_cache->maxEntries; i++)
{
bitmap = offscreen_cache->entries[i];

View File

@ -132,7 +132,7 @@ void pointer_cache_free(rdpPointerCache* pointer_cache)
int i;
rdpPointer* pointer;
for (i = 0; i < pointer_cache->cacheSize; i++)
for (i = 0; i < (int) pointer_cache->cacheSize; i++)
{
pointer = pointer_cache->entries[i];

View File

@ -1421,7 +1421,7 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
*/
void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
{
uint16 captureFlags;
uint32 captureFlags;
uint8 codecMode;
captureFlags = settings->dump_rfx ? 0 : CARDP_CAPS_CAPTURE_NON_CAC;

View File

@ -25,6 +25,10 @@
#include <freerdp/freerdp.h>
#include <freerdp/extension.h>
#ifdef _WIN32
#include <windows.h>
#endif
#define FREERDP_EXT_MAX_COUNT 16
struct rdp_extension

View File

@ -1310,7 +1310,7 @@ void update_read_cache_color_table_order(STREAM* s, CACHE_COLOR_TABLE_ORDER* cac
else
colorTable = (uint32*) xrealloc(colorTable, cache_color_table_order->numberColors * 4);
for (i = 0; i < cache_color_table_order->numberColors; i++)
for (i = 0; i < (int) cache_color_table_order->numberColors; i++)
{
update_read_color_quad(s, &colorTable[i]);
}
@ -1327,7 +1327,7 @@ void update_read_cache_glyph_order(STREAM* s, CACHE_GLYPH_ORDER* cache_glyph_ord
stream_read_uint8(s, cache_glyph_order->cacheId); /* cacheId (1 byte) */
stream_read_uint8(s, cache_glyph_order->cGlyphs); /* cGlyphs (1 byte) */
for (i = 0; i < cache_glyph_order->cGlyphs; i++)
for (i = 0; i < (int) cache_glyph_order->cGlyphs; i++)
{
glyph = (GLYPH_DATA*) xmalloc(sizeof(GLYPH_DATA));
cache_glyph_order->glyphData[i] = glyph;
@ -1361,7 +1361,7 @@ void update_read_cache_glyph_v2_order(STREAM* s, CACHE_GLYPH_V2_ORDER* cache_gly
cache_glyph_v2_order->flags = (flags & 0x00F0) >> 4;
cache_glyph_v2_order->cGlyphs = (flags & 0xFF00) >> 8;
for (i = 0; i < cache_glyph_v2_order->cGlyphs; i++)
for (i = 0; i < (int) cache_glyph_v2_order->cGlyphs; i++)
{
glyph = (GLYPH_DATA_V2*) xmalloc(sizeof(GLYPH_DATA_V2));
cache_glyph_v2_order->glyphData[i] = glyph;
@ -1493,7 +1493,7 @@ void update_read_create_offscreen_bitmap_order(STREAM* s, CREATE_OFFSCREEN_BITMA
else
deleteList->indices = xrealloc(deleteList->indices, deleteList->cIndices * 2);
for (i = 0; i < deleteList->cIndices; i++)
for (i = 0; i < (int) deleteList->cIndices; i++)
{
stream_read_uint16(s, deleteList->indices[i]);
}

View File

@ -105,7 +105,7 @@ void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_upda
}
/* rectangles */
for (i = 0; i < bitmap_update->number; i++)
for (i = 0; i < (int) bitmap_update->number; i++)
{
update_read_bitmap_data(s, &bitmap_update->rectangles[i]);
}
@ -403,7 +403,7 @@ static void update_send_surface_bits(rdpContext* context, SURFACE_BITS_COMMAND*
rdpRdp* rdp = context->rdp;
s = fastpath_update_pdu_init(rdp->fastpath);
stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH + surface_bits_command->bitmapDataLength);
stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH + (int) surface_bits_command->bitmapDataLength);
update_write_surfcmd_surface_bits_header(s, surface_bits_command);
stream_write(s, surface_bits_command->bitmapData, surface_bits_command->bitmapDataLength);
fastpath_send_update_pdu(rdp->fastpath, FASTPATH_UPDATETYPE_SURFCMDS, s);
@ -462,7 +462,7 @@ static void update_send_pointer_system(rdpContext* context, POINTER_SYSTEM_UPDAT
static void update_write_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color)
{
stream_check_size(s, 15 + pointer_color->lengthAndMask + pointer_color->lengthXorMask);
stream_check_size(s, 15 + (int) pointer_color->lengthAndMask + (int) pointer_color->lengthXorMask);
stream_write_uint16(s, pointer_color->cacheIndex);
stream_write_uint16(s, pointer_color->xPos);
stream_write_uint16(s, pointer_color->yPos);

View File

@ -140,7 +140,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
window_state->windowRects = (RECTANGLE_16*) xmalloc(size);
/* windowRects */
for (i = 0; i < window_state->numWindowRects; i++)
for (i = 0; i < (int) window_state->numWindowRects; i++)
{
freerdp_read_rectangle_16(s, &window_state->windowRects[i]);
}
@ -160,7 +160,7 @@ void update_read_window_state_order(STREAM* s, WINDOW_ORDER_INFO* orderInfo, WIN
window_state->visibilityRects = (RECTANGLE_16*) xmalloc(size);
/* visibilityRects */
for (i = 0; i < window_state->numVisibilityRects; i++)
for (i = 0; i < (int) window_state->numVisibilityRects; i++)
{
freerdp_read_rectangle_16(s, &window_state->visibilityRects[i]);
}
@ -292,7 +292,7 @@ void update_read_desktop_actively_monitored_order(STREAM* s, WINDOW_ORDER_INFO*
monitored_desktop->windowIds = (uint32*) xrealloc(monitored_desktop->windowIds, size);
/* windowIds */
for (i = 0; i < monitored_desktop->numWindowIds; i++)
for (i = 0; i < (int) monitored_desktop->numWindowIds; i++)
{
stream_read_uint32(s, monitored_desktop->windowIds[i]);
}

View File

@ -550,7 +550,7 @@ void gdi_multi_opaque_rect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_o
DELTA_RECT* rectangle;
rdpGdi *gdi = context->gdi;
for (i = 1; i < multi_opaque_rect->numRectangles + 1; i++)
for (i = 1; i < (int) multi_opaque_rect->numRectangles + 1; i++)
{
rectangle = &multi_opaque_rect->rectangles[i];
@ -603,7 +603,7 @@ void gdi_polyline(rdpContext* context, POLYLINE_ORDER* polyline)
gdi_MoveToEx(gdi->drawing->hdc, x, y, NULL);
points = polyline->points;
for (i = 0; i < polyline->numPoints; i++)
for (i = 0; i < (int) polyline->numPoints; i++)
{
x += points[i].x;
y += points[i].y;

View File

@ -239,7 +239,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
window->windowRects = window_state->windowRects;
window->numWindowRects = window_state->numWindowRects;
for (i = 0; i < window_state->numWindowRects; i++)
for (i = 0; i < (int) window_state->numWindowRects; i++)
{
DEBUG_RAIL("Window Rect #%d: left:%d top:%d right:%d bottom:%d", i,
window_state->windowRects[i].left, window_state->windowRects[i].top,
@ -266,7 +266,7 @@ void window_state_update(rdpWindow* window, WINDOW_ORDER_INFO* orderInfo, WINDOW
window->visibilityRects = window_state->visibilityRects;
window->numVisibilityRects = window_state->numVisibilityRects;
for (i = 0; i < window_state->numVisibilityRects; i++)
for (i = 0; i < (int) window_state->numVisibilityRects; i++)
{
DEBUG_RAIL("Visibility Rect #%d: left:%d top:%d right:%d bottom:%d", i,
window_state->visibilityRects[i].left, window_state->visibilityRects[i].top,