From ceee946e0b5972dd0c8aa1ab34412337c1358e7e Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 18 Oct 2021 15:25:32 +0200 Subject: [PATCH] Fixed warnings --- libfreerdp/core/rdp.c | 11 ++++------- libfreerdp/gdi/video.c | 10 ++++------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/libfreerdp/core/rdp.c b/libfreerdp/core/rdp.c index 7ed6f3add..d96834e7e 100644 --- a/libfreerdp/core/rdp.c +++ b/libfreerdp/core/rdp.c @@ -879,10 +879,10 @@ static BOOL rdp_recv_monitor_layout_pdu(rdpRdp* rdp, wStream* s) for (monitor = monitorDefArray, index = 0; index < monitorCount; index++, monitor++) { - Stream_Read_UINT32(s, monitor->left); /* left (4 bytes) */ - Stream_Read_UINT32(s, monitor->top); /* top (4 bytes) */ - Stream_Read_UINT32(s, monitor->right); /* right (4 bytes) */ - Stream_Read_UINT32(s, monitor->bottom); /* bottom (4 bytes) */ + Stream_Read_INT32(s, monitor->left); /* left (4 bytes) */ + Stream_Read_INT32(s, monitor->top); /* top (4 bytes) */ + Stream_Read_INT32(s, monitor->right); /* right (4 bytes) */ + Stream_Read_INT32(s, monitor->bottom); /* bottom (4 bytes) */ Stream_Read_UINT32(s, monitor->flags); /* flags (4 bytes) */ } @@ -1781,7 +1781,6 @@ rdpRdp* rdp_new(rdpContext* context) { rdpRdp* rdp; DWORD flags; - BOOL newSettings = FALSE; rdp = (rdpRdp*)calloc(1, sizeof(rdpRdp)); if (!rdp) @@ -1801,8 +1800,6 @@ rdpRdp* rdp_new(rdpContext* context) if (!context->settings) goto fail; - - newSettings = TRUE; } rdp->settings = context->settings; diff --git a/libfreerdp/gdi/video.c b/libfreerdp/gdi/video.c index 59a1677d2..ac62d5a94 100644 --- a/libfreerdp/gdi/video.c +++ b/libfreerdp/gdi/video.c @@ -48,6 +48,10 @@ void gdi_video_geometry_init(rdpGdi* gdi, GeometryClientContext* geom) void gdi_video_geometry_uninit(rdpGdi* gdi, GeometryClientContext* geom) { + WINPR_ASSERT(gdi); + WINPR_ASSERT(geom); + WINPR_UNUSED(gdi); + WINPR_UNUSED(geom); } static VideoSurface* gdiVideoCreateSurface(VideoClientContext* video, UINT32 x, UINT32 y, @@ -61,7 +65,6 @@ static BOOL gdiVideoShowSurface(VideoClientContext* video, const VideoSurface* s { BOOL rc = FALSE; rdpGdi* gdi; - RECTANGLE_16 surfaceRect; rdpUpdate* update; WINPR_ASSERT(video); @@ -74,11 +77,6 @@ static BOOL gdiVideoShowSurface(VideoClientContext* video, const VideoSurface* s update = gdi->context->update; WINPR_ASSERT(update); - surfaceRect.left = surface->x; - surfaceRect.top = surface->y; - surfaceRect.right = surface->x + surface->w; - surfaceRect.bottom = surface->y + surface->h; - if (!update_begin_paint(update)) goto fail;