Merge pull request #3953 from hardening/kill_warnings

Drop some annoying warning
This commit is contained in:
akallabeth 2017-05-15 11:54:57 +02:00 committed by GitHub
commit 452eb55a3c
13 changed files with 29 additions and 109 deletions

View File

@ -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
*
@ -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;

View File

@ -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
*
@ -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

View File

@ -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)
@ -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)
{

View File

@ -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)",
@ -58,6 +59,7 @@ static const char* movetype_names[] =
"RAIL_WMSZ_KEYMOVE",
"RAIL_WMSZ_KEYSIZE"
};
#endif
void xf_rail_enable_remoteapp_mode(xfContext* xfc)
{

View File

@ -789,9 +789,9 @@ 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
@ -799,7 +799,7 @@ FREERDP_API BYTE* freerdp_glyph_convert(UINT32 width, UINT32 height,
* @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
*/
@ -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
@ -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
*/
@ -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
@ -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

View File

@ -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)
{

View File

@ -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,

View File

@ -292,8 +292,7 @@ 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",
@ -301,6 +300,7 @@ static void progressive_rfx_quant_print(RFX_COMPONENT_CODEC_QUANT* q,
q->LL3);
}
static INLINE BOOL progressive_set_surface_data(PROGRESSIVE_CONTEXT* progressive,
UINT16 surfaceId, void* pData)
{
@ -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)
{
@ -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);

View File

@ -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;
@ -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)
{
@ -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));

View File

@ -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)
@ -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;

View File

@ -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;

View File

@ -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)
{
@ -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)
{

View File

@ -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
@ -378,6 +379,7 @@ static void mcs_print_domain_parameters(DomainParameters* domainParameters)
WLog_INFO(TAG, "}");
}
#endif
/**
* Merge MCS Domain Parameters.