Skip to content

Commit

Permalink
Drop some annoying warning
Browse files Browse the repository at this point in the history
Probably that some unused functions should be removed, but at least it makes
it compile with no warnings.
  • Loading branch information
hardening committed May 12, 2017
1 parent b1df835 commit 17a4e95
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 109 deletions.
28 changes: 1 addition & 27 deletions channels/encomsp/client/encomsp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,31 +916,6 @@ static void encomsp_process_connect(encomspPlugin* encomsp)
{
}

static int encomsp_send(encomspPlugin* encomsp, wStream* s)
{
UINT32 status = 0;
encomspPlugin* plugin = (encomspPlugin*) encomsp;

if (!plugin)
{
status = CHANNEL_RC_BAD_INIT_HANDLE;
}
else
{
status = plugin->channelEntryPoints.pVirtualChannelWriteEx(plugin->InitHandle, plugin->OpenHandle,
Stream_Buffer(s), (UINT32) Stream_GetPosition(s), s);
}

if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "VirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}

return status;
}

/**
* Function description
*
Expand Down Expand Up @@ -1018,8 +993,7 @@ static VOID VCAPITYPE encomsp_virtual_channel_open_event_ex(LPVOID lpUserParam,
case CHANNEL_EVENT_DATA_RECEIVED:
if ((error = encomsp_virtual_channel_event_data_received(encomsp, pData,
dataLength, totalLength, dataFlags)))
WLog_ERR(TAG,
"encomsp_virtual_channel_event_data_received failed with error %"PRIu32"", error);
WLog_ERR(TAG, "encomsp_virtual_channel_event_data_received failed with error %"PRIu32"", error);

break;

Expand Down
37 changes: 0 additions & 37 deletions channels/remdesk/client/remdesk_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@

#include "remdesk_main.h"

static RemdeskClientContext* remdesk_get_client_interface(
remdeskPlugin* remdesk)
{
RemdeskClientContext* pInterface;
pInterface = (RemdeskClientContext*) remdesk->channelEntryPoints.pInterface;
return pInterface;
}

/**
* Function description
*
Expand Down Expand Up @@ -710,35 +702,6 @@ static void remdesk_process_connect(remdeskPlugin* remdesk)
remdesk->settings = (rdpSettings*) remdesk->channelEntryPoints.pExtendedData;
}

/**
* Function description
*
* @return 0 on success, otherwise a Win32 error code
*/
static UINT remdesk_send(remdeskPlugin* remdesk, wStream* s)
{
UINT status = 0;
remdeskPlugin* plugin = (remdeskPlugin*) remdesk;

if (!plugin)
{
status = CHANNEL_RC_BAD_INIT_HANDLE;
}
else
{
status = plugin->channelEntryPoints.pVirtualChannelWriteEx(plugin->InitHandle, plugin->OpenHandle,
Stream_Buffer(s), (UINT32) Stream_GetPosition(s), s);
}

if (status != CHANNEL_RC_OK)
{
Stream_Free(s, TRUE);
WLog_ERR(TAG, "pVirtualChannelWriteEx failed with %s [%08"PRIX32"]",
WTSErrorToString(status), status);
}

return status;
}

/**
* Function description
Expand Down
2 changes: 2 additions & 0 deletions client/X11/xf_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ static int xf_input_handle_event_local(xfContext* xfc, XEvent* event)
return 0;
}

#ifdef WITH_DEBUG_X11
static char* xf_input_touch_state_string(DWORD flags)
{
if (flags & CONTACT_FLAG_DOWN)
Expand All @@ -491,6 +492,7 @@ static char* xf_input_touch_state_string(DWORD flags)
else
return "TouchUnknown";
}
#endif

static void xf_input_hide_cursor(xfContext* xfc)
{
Expand Down
2 changes: 2 additions & 0 deletions client/X11/xf_rail.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static const char* error_code_names[] =
"RAIL_EXEC_E_SESSION_LOCKED"
};

#ifdef WITH_DEBUG_RAIL
static const char* movetype_names[] =
{
"(invalid)",
Expand All @@ -58,6 +59,7 @@ static const char* movetype_names[] =
"RAIL_WMSZ_KEYMOVE",
"RAIL_WMSZ_KEYSIZE"
};
#endif

void xf_rail_enable_remoteapp_mode(xfContext* xfc)
{
Expand Down
24 changes: 12 additions & 12 deletions include/freerdp/codec/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,17 +789,17 @@ FREERDP_API BYTE* freerdp_glyph_convert(UINT32 width, UINT32 height,

/***
*
* @param pDstData destionation buffer
* @param DstFormat destionation buffer format
* @param nDstStep destionation buffer stride (line in bytes) 0 for default
* @param pDstData destination buffer
* @param DstFormat destination buffer format
* @param nDstStep destination buffer stride (line in bytes) 0 for default
* @param nXDst destination buffer offset x
* @param nYDst destination buffer offset y
* @param nWidth width to copy in pixels
* @param nHeight height to copy in pixels
* @param pSrcData source buffer, must be (nWidth + 7) / 8 bytes long
* @param backColor The background color in internal representation format
* @param foreColor The foreground color in internal representation format
* @param palette pallete to use (only used for 8 bit color!)
* @param palette palette to use (only used for 8 bit color!)
*
* @return TRUE if success, FALSE otherwise
*/
Expand All @@ -813,9 +813,9 @@ FREERDP_API BOOL freerdp_image_copy_from_monochrome(BYTE* pDstData,

/***
*
* @param pDstData destionation buffer
* @param DstFormat destionation buffer format
* @param nDstStep destionation buffer stride (line in bytes) 0 for default
* @param pDstData destination buffer
* @param DstFormat destination buffer format
* @param nDstStep destination buffer stride (line in bytes) 0 for default
* @param nXDst destination buffer offset x
* @param nYDst destination buffer offset y
* @param nWidth width to copy in pixels
Expand All @@ -825,7 +825,7 @@ FREERDP_API BOOL freerdp_image_copy_from_monochrome(BYTE* pDstData,
* @param andMask AND mask buffer
* @param andMaskLength AND mask length in bytes
* @param xorBpp XOR bits per pixel
* @param palette pallete to use (only used for 8 bit color!)
* @param palette palette to use (only used for 8 bit color!)
*
* @return TRUE if success, FALSE otherwise
*/
Expand All @@ -838,9 +838,9 @@ FREERDP_API BOOL freerdp_image_copy_from_pointer_data(

/***
*
* @param pDstData destionation buffer
* @param DstFormat destionation buffer format
* @param nDstStep destionation buffer stride (line in bytes) 0 for default
* @param pDstData destination buffer
* @param DstFormat destination buffer format
* @param nDstStep destination buffer stride (line in bytes) 0 for default
* @param nXDst destination buffer offset x
* @param nYDst destination buffer offset y
* @param nWidth width to copy in pixels
Expand All @@ -850,7 +850,7 @@ FREERDP_API BOOL freerdp_image_copy_from_pointer_data(
* @param nSrcStep source buffer stride (line in bytes) 0 for default
* @param nXSrc source buffer x offset in pixels
* @param nYSrc source buffer y offset in pixels
* @param palette pallete to use (only used for 8 bit color!)
* @param palette palette to use (only used for 8 bit color!)
* @param flags Image flipping flags FREERDP_FLIP_NONE et al
*
* @return TRUE if success, FALSE otherwise
Expand Down
2 changes: 1 addition & 1 deletion libfreerdp/cache/nine_grid.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@

#define TAG FREERDP_TAG("cache.nine_grid")


static void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index);
static void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry);


static BOOL update_gdi_draw_nine_grid(rdpContext* context,
const DRAW_NINE_GRID_ORDER* draw_nine_grid)
{
Expand Down
1 change: 1 addition & 0 deletions libfreerdp/cache/palette.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define TAG FREERDP_TAG("cache.palette")

static void* palette_cache_get(rdpPaletteCache* palette, UINT32 index);

static void palette_cache_put(rdpPaletteCache* palette, UINT32 index, void* entry);

static BOOL update_gdi_cache_color_table(rdpContext* context,
Expand Down
8 changes: 3 additions & 5 deletions libfreerdp/codec/progressive.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,15 @@ static INLINE BOOL progressive_rfx_quant_cmp_equal(RFX_COMPONENT_CODEC_QUANT* q1
return TRUE;
}

static void progressive_rfx_quant_print(RFX_COMPONENT_CODEC_QUANT* q,
const char* name)
static void progressive_rfx_quant_print(RFX_COMPONENT_CODEC_QUANT* q, const char* name)
{
fprintf(stderr,
"%s: HL1: %"PRIu8" LH1: %"PRIu8" HH1: %"PRIu8" HL2: %"PRIu8" LH2: %"PRIu8" HH2: %"PRIu8" HL3: %"PRIu8" LH3: %"PRIu8" HH3: %"PRIu8" LL3: %"PRIu8"\n",
name, q->HL1, q->LH1, q->HH1, q->HL2, q->LH2, q->HH2, q->HL3, q->LH3, q->HH3,
q->LL3);
}


static INLINE BOOL progressive_set_surface_data(PROGRESSIVE_CONTEXT* progressive,
UINT16 surfaceId, void* pData)
{
Expand Down Expand Up @@ -338,8 +338,7 @@ static PROGRESSIVE_SURFACE_CONTEXT* progressive_surface_context_new(UINT16 surfa
surface->gridWidth = (width + (64 - width % 64)) / 64;
surface->gridHeight = (height + (64 - height % 64)) / 64;
surface->gridSize = surface->gridWidth * surface->gridHeight;
surface->tiles = (RFX_PROGRESSIVE_TILE*) calloc(
surface->gridSize, sizeof(RFX_PROGRESSIVE_TILE));
surface->tiles = (RFX_PROGRESSIVE_TILE*) calloc(surface->gridSize, sizeof(RFX_PROGRESSIVE_TILE));

if (!surface->tiles)
{
Expand Down Expand Up @@ -399,7 +398,6 @@ INT32 progressive_create_surface_context(PROGRESSIVE_CONTEXT* progressive,
int progressive_delete_surface_context(PROGRESSIVE_CONTEXT* progressive,
UINT16 surfaceId)
{
int ret = 0;
PROGRESSIVE_SURFACE_CONTEXT* surface;
surface = (PROGRESSIVE_SURFACE_CONTEXT *)progressive_get_surface_data(progressive, surfaceId);

Expand Down
4 changes: 3 additions & 1 deletion libfreerdp/codec/xcrush.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

#define TAG FREERDP_TAG("codec")

#ifdef DEBUG_XCRUSH
static const char* xcrush_get_level_2_compression_flags_string(UINT32 flags)
{
flags &= 0xE0;
Expand Down Expand Up @@ -95,6 +96,7 @@ static const char* xcrush_get_level_1_compression_flags_string(UINT32 flags)

return "L1_UNKNOWN";
}
#endif

static UINT32 xcrush_update_hash(BYTE* data, UINT32 size)
{
Expand Down Expand Up @@ -974,7 +976,7 @@ int xcrush_compress(XCRUSH_CONTEXT* xcrush, BYTE* pSrcData, UINT32 SrcSize, BYTE
Level1ComprFlags |= L1_INNER_COMPRESSION;
OriginalData[0] = (BYTE) Level1ComprFlags;
OriginalData[1] = (BYTE) Level2ComprFlags;
#if 0
#if DEBUG_XCRUSH
WLog_DBG(TAG, "XCrushCompress: Level1ComprFlags: %s Level2ComprFlags: %s",
xcrush_get_level_1_compression_flags_string(Level1ComprFlags),
xcrush_get_level_2_compression_flags_string(Level2ComprFlags));
Expand Down
4 changes: 2 additions & 2 deletions libfreerdp/core/capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,7 @@ static void rdp_write_gdiplus_image_cache_properties(wStream* s, UINT16 oiccs,
Stream_Write_UINT16(s, oicms); /* gdipObjectImageCacheMaxSize (2 bytes) */
}


#ifdef WITH_DEBUG_CAPABILITIES
static BOOL rdp_print_draw_nine_grid_cache_capability_set(wStream* s,
UINT16 length)
Expand Down Expand Up @@ -2098,8 +2099,7 @@ static BOOL rdp_read_draw_gdiplus_cache_capability_set(wStream* s,
* @param settings settings
*/

static BOOL rdp_write_draw_gdiplus_cache_capability_set(wStream* s,
rdpSettings* settings)
static BOOL rdp_write_draw_gdiplus_cache_capability_set(wStream* s, rdpSettings* settings)
{
int header;
UINT32 drawGDIPlusSupportLevel;
Expand Down
14 changes: 0 additions & 14 deletions libfreerdp/core/fastpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,20 +446,6 @@ static int fastpath_recv_update(rdpFastPath* fastpath, BYTE updateCode, UINT32 s
return status;
}

static const char* fastpath_get_fragmentation_string(BYTE fragmentation)
{
if (fragmentation == FASTPATH_FRAGMENT_SINGLE)
return "FASTPATH_FRAGMENT_SINGLE";
else if (fragmentation == FASTPATH_FRAGMENT_LAST)
return "FASTPATH_FRAGMENT_LAST";
else if (fragmentation == FASTPATH_FRAGMENT_FIRST)
return "FASTPATH_FRAGMENT_FIRST";
else if (fragmentation == FASTPATH_FRAGMENT_NEXT)
return "FASTPATH_FRAGMENT_NEXT";

return "FASTPATH_FRAGMENT_UNKNOWN";
}

static int fastpath_recv_update_data(rdpFastPath* fastpath, wStream* s)
{
int status;
Expand Down
10 changes: 0 additions & 10 deletions libfreerdp/core/gateway/tsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,11 +1214,6 @@ static BOOL TsProxySetupReceivePipeWriteRequest(rdpTsg* tsg, CONTEXT_HANDLE* cha
return TRUE;
}

static BOOL TsProxySetupReceivePipeReadResponse(rdpTsg* tsg, RPC_PDU* pdu)
{
WLog_DBG(TAG, "TsProxySetupReceivePipeReadResponse");
return TRUE;
}

int tsg_transition_to_state(rdpTsg* tsg, TSG_STATE state)
{
Expand Down Expand Up @@ -1860,11 +1855,6 @@ void tsg_free(rdpTsg* tsg)
}
}

static long transport_bio_tsg_callback(BIO* bio, int mode, const char* argp, int argi, long argl,
long ret)
{
return 1;
}

static int transport_bio_tsg_write(BIO* bio, const char* buf, int num)
{
Expand Down
2 changes: 2 additions & 0 deletions libfreerdp/core/mcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static BOOL mcs_write_domain_parameters(wStream* s, DomainParameters* domainPara
return TRUE;
}

#ifdef DEBUG_MCS
/**
* Print MCS Domain Parameters.
* @param domainParameters domain parameters
Expand All @@ -378,6 +379,7 @@ static void mcs_print_domain_parameters(DomainParameters* domainParameters)

WLog_INFO(TAG, "}");
}
#endif

/**
* Merge MCS Domain Parameters.
Expand Down

0 comments on commit 17a4e95

Please sign in to comment.