From 00c083a854bdbadb07f0b6f79f2a5494e0a0b7c7 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 14 Sep 2021 07:38:25 +0200 Subject: [PATCH] Fixed compilation warnings. --- channels/encomsp/client/encomsp_main.c | 3 ++- libfreerdp/codec/include/bitmap.c | 2 +- libfreerdp/codec/interleaved.c | 6 ++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/channels/encomsp/client/encomsp_main.c b/channels/encomsp/client/encomsp_main.c index a908776a5..652e87752 100644 --- a/channels/encomsp/client/encomsp_main.c +++ b/channels/encomsp/client/encomsp_main.c @@ -24,6 +24,7 @@ #endif #include +#include #include #include @@ -1140,7 +1141,7 @@ static DWORD WINAPI encomsp_virtual_channel_client_thread(LPVOID arg) static UINT encomsp_virtual_channel_event_connected(encomspPlugin* encomsp, LPVOID pData, UINT32 dataLength) { - UINT32 status; + WINPR_ASSERT(encomsp); encomsp->queue = MessageQueue_New(NULL); diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index ee9f4b6da..f82e14b53 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -100,7 +100,7 @@ static INLINE BOOL RLEDECOMPRESS(const BYTE* pbSrcBuffer, UINT32 cbSrcBuffer, BY PIXEL pixelA, pixelB; UINT32 runLength; UINT32 code; - UINT32 advance; + UINT32 advance = 0; RLEEXTRA if ((rowDelta == 0) || (rowDelta < width)) diff --git a/libfreerdp/codec/interleaved.c b/libfreerdp/codec/interleaved.c index d61eca0d3..d516446a3 100644 --- a/libfreerdp/codec/interleaved.c +++ b/libfreerdp/codec/interleaved.c @@ -130,10 +130,8 @@ static INLINE UINT32 ExtractCodeId(BYTE bOrderHdr) static INLINE UINT32 ExtractRunLength(UINT32 code, const BYTE* pbOrderHdr, const BYTE* pbEnd, UINT32* advance) { - UINT32 runLength; - UINT32 ladvance; - ladvance = 1; - runLength = 0; + UINT32 runLength = 0; + UINT32 ladvance = 1; if (pbOrderHdr >= pbEnd) return 0;