From 535a4352a7a08851314ce12c9613b13d7b6bd2bf Mon Sep 17 00:00:00 2001 From: Norbert Federa Date: Thu, 21 May 2015 10:56:56 +0200 Subject: [PATCH] shadow/client context cleanup and unused vars fix --- libfreerdp/cache/brush.c | 2 -- libfreerdp/codec/nsc.c | 1 - server/shadow/shadow_client.c | 3 ++- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libfreerdp/cache/brush.c b/libfreerdp/cache/brush.c index ffd802aee..8b5ea43da 100644 --- a/libfreerdp/cache/brush.c +++ b/libfreerdp/cache/brush.c @@ -141,8 +141,6 @@ void* brush_cache_get(rdpBrushCache* brushCache, UINT32 index, UINT32* bpp) void brush_cache_put(rdpBrushCache* brushCache, UINT32 index, void* entry, UINT32 bpp) { - void* prevEntry; - if (bpp == 1) { if (index >= brushCache->maxMonoEntries) diff --git a/libfreerdp/codec/nsc.c b/libfreerdp/codec/nsc.c index 4d1ec7c69..859a208cf 100644 --- a/libfreerdp/codec/nsc.c +++ b/libfreerdp/codec/nsc.c @@ -277,7 +277,6 @@ int nsc_context_reset(NSC_CONTEXT* context) NSC_CONTEXT* nsc_context_new(void) { - UINT8 i; NSC_CONTEXT* context; context = (NSC_CONTEXT*) calloc(1, sizeof(NSC_CONTEXT)); diff --git a/server/shadow/shadow_client.c b/server/shadow/shadow_client.c index f723dab87..657d3f890 100644 --- a/server/shadow/shadow_client.c +++ b/server/shadow/shadow_client.c @@ -99,9 +99,10 @@ BOOL shadow_client_context_new(freerdp_peer* peer, rdpShadowClient* client) return TRUE; shadow_encoder_free(client->encoder); + client->encoder = NULL; fail_encoder_new: CloseHandle(client->StopEvent); - client->encoder = NULL; + client->StopEvent = NULL; fail_stop_event: WTSCloseServer((HANDLE) client->vcm); client->vcm = NULL;