From e4967710346da60bc722c37e932e4ab01549105b Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 6 Mar 2023 09:00:22 +0100 Subject: [PATCH] [warnings] fixed unused-variable warnings --- libfreerdp/codec/include/bitmap.c | 2 ++ libfreerdp/codec/progressive.c | 1 - libfreerdp/core/redirection.c | 2 -- libfreerdp/crypto/certificate.c | 1 + libfreerdp/utils/signal.c | 2 -- 5 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libfreerdp/codec/include/bitmap.c b/libfreerdp/codec/include/bitmap.c index 477b5ee61..ed2e02f10 100644 --- a/libfreerdp/codec/include/bitmap.c +++ b/libfreerdp/codec/include/bitmap.c @@ -94,7 +94,9 @@ static INLINE BYTE* WRITEFIRSTLINEFGBGIMAGE(BYTE* pbDest, const BYTE* pbDestEnd, static INLINE BOOL RLEDECOMPRESS(const BYTE* pbSrcBuffer, UINT32 cbSrcBuffer, BYTE* pbDestBuffer, UINT32 rowDelta, UINT32 width, UINT32 height) { +#if defined(WITH_DEBUG_CODECS) char sbuffer[128] = { 0 }; +#endif const BYTE* pbSrc = pbSrcBuffer; const BYTE* pbEnd; const BYTE* pbDestEnd; diff --git a/libfreerdp/codec/progressive.c b/libfreerdp/codec/progressive.c index cb9837e42..5c82dbe49 100644 --- a/libfreerdp/codec/progressive.c +++ b/libfreerdp/codec/progressive.c @@ -2630,7 +2630,6 @@ fail: static BOOL progressive_rfx_write_message_progressive_simple(PROGRESSIVE_CONTEXT* progressive, wStream* s, const RFX_MESSAGE* msg) { - UINT32 i; RFX_CONTEXT* context; WINPR_ASSERT(progressive); diff --git a/libfreerdp/core/redirection.c b/libfreerdp/core/redirection.c index 03435d323..989805a73 100644 --- a/libfreerdp/core/redirection.c +++ b/libfreerdp/core/redirection.c @@ -225,8 +225,6 @@ static BOOL rdp_redirection_write_base64_wchar(UINT32 flag, wStream* s, size_t l const void* data) { BOOL rc = FALSE; - char buffer[64] = { 0 }; - const BYTE* ptr = NULL; char* base64 = crypto_base64_encode(data, length); if (!base64) diff --git a/libfreerdp/crypto/certificate.c b/libfreerdp/crypto/certificate.c index b507f7a83..d48370194 100644 --- a/libfreerdp/crypto/certificate.c +++ b/libfreerdp/crypto/certificate.c @@ -1306,6 +1306,7 @@ fail: char* freerdp_certificate_get_pem(const rdpCertificate* cert, size_t* pLength) { + BOOL rc = FALSE; char* pem = NULL; WINPR_ASSERT(cert); diff --git a/libfreerdp/utils/signal.c b/libfreerdp/utils/signal.c index 9ca5c6437..80622ed5e 100644 --- a/libfreerdp/utils/signal.c +++ b/libfreerdp/utils/signal.c @@ -80,8 +80,6 @@ static void unlock(void) static void term_handler(int signum) { - struct sigaction default_sigaction; - sigset_t this_mask; static BOOL recursive = FALSE; if (!recursive)