Fixed #5895: cast warnings.
This commit is contained in:
parent
75be471d78
commit
436b68e416
@ -934,13 +934,16 @@ error_out:
|
||||
static rdpPrinterDriver* printer_load_backend(const char* backend)
|
||||
{
|
||||
typedef rdpPrinterDriver* (*backend_load_t)(void);
|
||||
union {
|
||||
PVIRTUALCHANNELENTRY entry;
|
||||
backend_load_t backend;
|
||||
} fktconv;
|
||||
|
||||
backend_load_t entry =
|
||||
(backend_load_t)freerdp_load_channel_addin_entry("printer", backend, NULL, 0);
|
||||
if (!entry)
|
||||
fktconv.entry = freerdp_load_channel_addin_entry("printer", backend, NULL, 0);
|
||||
if (!fktconv.entry)
|
||||
return NULL;
|
||||
|
||||
return entry();
|
||||
return fktconv.backend();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -183,7 +183,12 @@ UINT devman_load_device_service(DEVMAN* devman, const RDPDR_DEVICE* device, rdpC
|
||||
const char* ServiceName = NULL;
|
||||
DEVICE_SERVICE_ENTRY_POINTS ep;
|
||||
PDEVICE_SERVICE_ENTRY entry = NULL;
|
||||
union {
|
||||
const RDPDR_DEVICE* cdp;
|
||||
RDPDR_DEVICE* dp;
|
||||
} devconv;
|
||||
|
||||
devconv.cdp = device;
|
||||
if (!devman || !device || !rdpcontext)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
@ -220,7 +225,7 @@ UINT devman_load_device_service(DEVMAN* devman, const RDPDR_DEVICE* device, rdpC
|
||||
|
||||
ep.devman = devman;
|
||||
ep.RegisterDevice = devman_register_device;
|
||||
ep.device = device;
|
||||
ep.device = devconv.dp;
|
||||
ep.rdpcontext = rdpcontext;
|
||||
return entry(&ep);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static INLINE INT32 planar_decompress_plane_rle_only(const BYTE* pSrcData, UINT3
|
||||
|
||||
previousScanline = NULL;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
for (y = 0; y < (INT32)nHeight; y++)
|
||||
{
|
||||
BYTE* dstp = &pDstData[((y) * (INT32)nWidth)];
|
||||
pixel = 0;
|
||||
|
@ -2145,6 +2145,12 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcD
|
||||
REGION16 clippingRects, updateRegion;
|
||||
PROGRESSIVE_BLOCK_REGION* region;
|
||||
PROGRESSIVE_SURFACE_CONTEXT* surface = progressive_get_surface_data(progressive, surfaceId);
|
||||
union {
|
||||
const BYTE* cbp;
|
||||
BYTE* bp;
|
||||
} sconv;
|
||||
|
||||
sconv.cbp = pSrcData;
|
||||
|
||||
if (!surface)
|
||||
{
|
||||
@ -2157,7 +2163,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcD
|
||||
if (!region)
|
||||
return -1111;
|
||||
|
||||
Stream_StaticInit(&ss, pSrcData, SrcSize);
|
||||
Stream_StaticInit(&ss, sconv.bp, SrcSize);
|
||||
s = &ss;
|
||||
|
||||
switch (DstFormat)
|
||||
|
@ -169,12 +169,17 @@ BOOL pf_modules_run_filter(PF_FILTER_TYPE type, proxyData* pdata, void* param)
|
||||
*/
|
||||
static BOOL pf_modules_set_plugin_data(const char* plugin_name, proxyData* pdata, void* data)
|
||||
{
|
||||
union {
|
||||
const char* ccp;
|
||||
char* cp;
|
||||
} ccharconv;
|
||||
assert(plugin_name);
|
||||
|
||||
ccharconv.ccp = plugin_name;
|
||||
if (data == NULL) /* no need to store anything */
|
||||
return FALSE;
|
||||
|
||||
if (HashTable_Add(pdata->modules_info, plugin_name, data) < 0)
|
||||
if (HashTable_Add(pdata->modules_info, ccharconv.cp, data) < 0)
|
||||
{
|
||||
WLog_ERR(TAG, "[%s]: HashTable_Add failed!");
|
||||
return FALSE;
|
||||
@ -192,10 +197,15 @@ static BOOL pf_modules_set_plugin_data(const char* plugin_name, proxyData* pdata
|
||||
*/
|
||||
static void* pf_modules_get_plugin_data(const char* plugin_name, proxyData* pdata)
|
||||
{
|
||||
union {
|
||||
const char* ccp;
|
||||
char* cp;
|
||||
} ccharconv;
|
||||
assert(plugin_name);
|
||||
assert(pdata);
|
||||
ccharconv.ccp = plugin_name;
|
||||
|
||||
return HashTable_GetItemValue(pdata->modules_info, plugin_name);
|
||||
return HashTable_GetItemValue(pdata->modules_info, ccharconv.cp);
|
||||
}
|
||||
|
||||
static void pf_modules_abort_connect(proxyData* pdata)
|
||||
|
Loading…
Reference in New Issue
Block a user