mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Fixed invalid argument types
This commit is contained in:
@@ -232,7 +232,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, rdpPointer
|
||||
#ifdef WITH_XCURSOR
|
||||
UINT32 CursorFormat;
|
||||
xfContext* xfc = (xfContext*)context;
|
||||
xfPointer* xpointer = pointer;
|
||||
xfPointer* xpointer = (xfPointer*)pointer;
|
||||
XcursorImage ci = { 0 };
|
||||
rdpSettings* settings;
|
||||
UINT32 xTargetSize;
|
||||
@@ -451,7 +451,7 @@ static BOOL xf_Pointer_Set(rdpContext* context, rdpPointer* pointer)
|
||||
xfContext* xfc = (xfContext*)context;
|
||||
Window handle = xf_Pointer_get_window(xfc);
|
||||
|
||||
xfc->pointer = pointer;
|
||||
xfc->pointer = (xfPointer*)pointer;
|
||||
|
||||
/* in RemoteApp mode, window can be null if none has had focus */
|
||||
|
||||
|
||||
8
libfreerdp/cache/pointer.c
vendored
8
libfreerdp/cache/pointer.c
vendored
@@ -33,7 +33,7 @@
|
||||
#define TAG FREERDP_TAG("cache.pointer")
|
||||
|
||||
static BOOL pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer);
|
||||
static const rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index);
|
||||
static rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index);
|
||||
|
||||
static void pointer_free(rdpContext* context, rdpPointer* pointer)
|
||||
{
|
||||
@@ -253,7 +253,7 @@ out_fail:
|
||||
|
||||
static BOOL update_pointer_cached(rdpContext* context, const POINTER_CACHED_UPDATE* pointer_cached)
|
||||
{
|
||||
const rdpPointer* pointer;
|
||||
rdpPointer* pointer;
|
||||
rdpCache* cache;
|
||||
|
||||
WINPR_ASSERT(context);
|
||||
@@ -270,9 +270,9 @@ static BOOL update_pointer_cached(rdpContext* context, const POINTER_CACHED_UPDA
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index)
|
||||
rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index)
|
||||
{
|
||||
const rdpPointer* pointer;
|
||||
rdpPointer* pointer;
|
||||
|
||||
WINPR_ASSERT(pointer_cache);
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ static BOOL test_RGBToRGB_16s8u_P3AC4R_speed(void)
|
||||
{
|
||||
union
|
||||
{
|
||||
const UINT16** cpv;
|
||||
UINT16** pv;
|
||||
const INT16** cpv;
|
||||
INT16** pv;
|
||||
} cnv;
|
||||
const prim_size_t roi64x64 = { 64, 64 };
|
||||
INT16 ALIGN(r[4096 + 1]), ALIGN(g[4096 + 1]), ALIGN(b[4096 + 1]);
|
||||
|
||||
@@ -1564,6 +1564,8 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
{
|
||||
union
|
||||
{
|
||||
const INT16** cpi;
|
||||
INT16** pi;
|
||||
const UINT16** cpv;
|
||||
UINT16** pv;
|
||||
} cnv;
|
||||
@@ -1572,7 +1574,7 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
float err[3];
|
||||
BYTE* actual;
|
||||
BYTE* actual1;
|
||||
const BYTE* expected = TEST_XRGB_IMAGE;
|
||||
const BYTE* expected = (const BYTE*)TEST_XRGB_IMAGE;
|
||||
int margin = 1;
|
||||
INT16* pYCbCr[3] = { NULL, NULL, NULL };
|
||||
const UINT32 srcStride = roi.width * 2;
|
||||
@@ -1615,9 +1617,9 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
|
||||
{
|
||||
PROFILER_ENTER(prof)
|
||||
cnv.pv = pYCbCr;
|
||||
cnv.pi = pYCbCr;
|
||||
status =
|
||||
prims->yCbCrToRGB_16s8u_P3AC4R(cnv.cpv, srcStride, actual, dstStride, format, &roi);
|
||||
prims->yCbCrToRGB_16s8u_P3AC4R(cnv.cpi, srcStride, actual, dstStride, format, &roi);
|
||||
if (status != PRIMITIVES_SUCCESS)
|
||||
goto fail;
|
||||
|
||||
@@ -1633,15 +1635,15 @@ static int test_PrimitivesYCbCr(const primitives_t* prims, UINT32 format, prim_s
|
||||
CopyMemory(pSrcDst[1], pYCbCr[1], srcSize);
|
||||
CopyMemory(pSrcDst[2], pYCbCr[2], srcSize);
|
||||
PROFILER_ENTER(prof1)
|
||||
cnv.pv = pSrcDst;
|
||||
status = prims->yCbCrToRGB_16s16s_P3P3(cnv.cpv, srcStride, pSrcDst, srcStride, &roi);
|
||||
cnv.pi = pSrcDst;
|
||||
status = prims->yCbCrToRGB_16s16s_P3P3(cnv.cpi, srcStride, pSrcDst, srcStride, &roi);
|
||||
PROFILER_EXIT(prof1)
|
||||
|
||||
if (status != PRIMITIVES_SUCCESS)
|
||||
goto fail2;
|
||||
|
||||
PROFILER_ENTER(prof2)
|
||||
status = prims->RGBToRGB_16s8u_P3AC4R(cnv.pv, srcStride, actual1, dstStride, format, &roi);
|
||||
status = prims->RGBToRGB_16s8u_P3AC4R(cnv.cpi, srcStride, actual1, dstStride, format, &roi);
|
||||
PROFILER_EXIT(prof2)
|
||||
fail2:
|
||||
_aligned_free(pSrcDst[0]);
|
||||
|
||||
@@ -176,8 +176,8 @@ static BOOL TestPrimitiveYUVCombine(primitives_t* prims, prim_size_t roi)
|
||||
{
|
||||
union
|
||||
{
|
||||
const UINT16** cpv;
|
||||
UINT16** pv;
|
||||
const BYTE** cpv;
|
||||
BYTE** pv;
|
||||
} cnv;
|
||||
UINT32 x, y, i;
|
||||
UINT32 awidth, aheight;
|
||||
@@ -381,8 +381,8 @@ static BOOL TestPrimitiveYUV(primitives_t* prims, prim_size_t roi, BOOL use444)
|
||||
{
|
||||
union
|
||||
{
|
||||
const UINT16** cpv;
|
||||
UINT16** pv;
|
||||
const BYTE** cpv;
|
||||
BYTE** pv;
|
||||
} cnv;
|
||||
BOOL res = FALSE;
|
||||
UINT32 x, y;
|
||||
|
||||
@@ -880,17 +880,30 @@ static int pf_client_verify_X509_certificate(freerdp* instance, const BYTE* data
|
||||
|
||||
void channel_data_free(void* obj)
|
||||
{
|
||||
union
|
||||
{
|
||||
const void* cpv;
|
||||
void* pv;
|
||||
} cnv;
|
||||
proxyChannelDataEventInfo* dst = obj;
|
||||
if (dst)
|
||||
{
|
||||
free(dst->data);
|
||||
free(dst->channel_name);
|
||||
cnv.cpv = dst->data;
|
||||
free(cnv.pv);
|
||||
|
||||
cnv.cpv = dst->channel_name;
|
||||
free(cnv.pv);
|
||||
free(dst);
|
||||
}
|
||||
}
|
||||
|
||||
static void* channel_data_copy(const void* obj)
|
||||
{
|
||||
union
|
||||
{
|
||||
const void* cpv;
|
||||
void* pv;
|
||||
} cnv;
|
||||
const proxyChannelDataEventInfo* src = obj;
|
||||
proxyChannelDataEventInfo* dst;
|
||||
|
||||
@@ -910,7 +923,9 @@ static void* channel_data_copy(const void* obj)
|
||||
dst->data = malloc(src->data_len);
|
||||
if (!dst->data)
|
||||
goto fail;
|
||||
memcpy(dst->data, src->data, src->data_len);
|
||||
|
||||
cnv.cpv = dst->data;
|
||||
memcpy(cnv.pv, src->data, src->data_len);
|
||||
return dst;
|
||||
|
||||
fail:
|
||||
|
||||
Reference in New Issue
Block a user