Fixed compiler warnings.

This commit is contained in:
Armin Novak
2018-03-07 14:47:06 +01:00
parent 66cc038c93
commit 44eebbb6e0
6 changed files with 15 additions and 15 deletions

View File

@@ -206,8 +206,8 @@ static DWORD WINAPI echo_server_thread_func(LPVOID arg)
{
WLog_ERR(TAG, "Stream_New failed!");
WTSVirtualChannelClose(echo->echo_channel);
ExitThread((DWORD)ERROR_NOT_ENOUGH_MEMORY);
return NULL;
ExitThread(ERROR_NOT_ENOUGH_MEMORY);
return ERROR_NOT_ENOUGH_MEMORY;
}
while (ready)

View File

@@ -1314,7 +1314,7 @@ static void xf_post_disconnect(freerdp* instance)
}
if ((xfc->window != NULL) && (xfc->drawable == xfc->window->handle))
xfc->drawable = NULL;
xfc->drawable = 0;
else
xf_DestroyDummyWindow(xfc, xfc->drawable);

View File

@@ -1684,7 +1684,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (region->numRects > progressive->cRects)
{
BYTE* tmpBuf = (RFX_RECT*) realloc(progressive->rects,
RFX_RECT* tmpBuf = (RFX_RECT*) realloc(progressive->rects,
region->numRects * sizeof(RFX_RECT));
if (!tmpBuf)
return -1016;
@@ -1713,7 +1713,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (region->numQuant > progressive->cQuant)
{
BYTE* tmpBuf = (RFX_COMPONENT_CODEC_QUANT*) realloc(
RFX_COMPONENT_CODEC_QUANT* tmpBuf = (RFX_COMPONENT_CODEC_QUANT*) realloc(
progressive->quantVals,
region->numQuant * sizeof(RFX_COMPONENT_CODEC_QUANT));
if (!tmpBuf)
@@ -1746,7 +1746,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (region->numProgQuant > progressive->cProgQuant)
{
BYTE* tmpBuf = (RFX_PROGRESSIVE_CODEC_QUANT*) realloc(
RFX_PROGRESSIVE_CODEC_QUANT* tmpBuf = (RFX_PROGRESSIVE_CODEC_QUANT*) realloc(
progressive->quantProgVals,
region->numProgQuant * sizeof(RFX_PROGRESSIVE_CODEC_QUANT));
if (!tmpBuf)
@@ -1779,7 +1779,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive,
if (progressive->cTiles < surface->gridSize)
{
BYTE* tmpBuf = (RFX_PROGRESSIVE_TILE**) realloc(progressive->tiles,
RFX_PROGRESSIVE_TILE** tmpBuf = (RFX_PROGRESSIVE_TILE**) realloc(progressive->tiles,
surface->gridSize * sizeof(RFX_PROGRESSIVE_TILE*));
if (!tmpBuf)
return -1025;

View File

@@ -919,7 +919,7 @@ static DWORD WINAPI x11_shadow_subsystem_thread(LPVOID arg)
}
ExitThread(0);
return NULL;
return 0;
}
static int x11_shadow_subsystem_base_init(x11ShadowSubsystem* subsystem)

View File

@@ -719,7 +719,7 @@ static UINT shadow_client_rdpgfx_caps_advertise(RdpgfxServerContext* context,
if (settings)
{
flags = pdu.capsSet->flags;
settings->GfxAVC444v2 = settings->GfxAVC444 = settings->GfxAVC444 = FALSE;
settings->GfxAVC444v2 = settings->GfxAVC444 = FALSE;
settings->GfxThinClient = (flags & RDPGFX_CAPS_FLAG_THINCLIENT);
settings->GfxSmallCache = (flags & RDPGFX_CAPS_FLAG_SMALL_CACHE);
#ifndef WITH_GFX_H264

View File

@@ -55,25 +55,25 @@ static DWORD WINAPI TestSynchCritical_Test1(LPVOID arg)
rc = 1;
if (!TestSynchCritical_TriggerAndCheckRaceCondition(hThread, rc))
return (PVOID)1;
return 1;
/* add some random recursion level */
j = rand()%5;
for (i=0; i<j; i++)
{
if (!TestSynchCritical_TriggerAndCheckRaceCondition(hThread, rc++))
return (PVOID)2;
return 2;
EnterCriticalSection(&critical);
}
for (i=0; i<j; i++)
{
if (!TestSynchCritical_TriggerAndCheckRaceCondition(hThread, rc--))
return (PVOID)2;
return 2;
LeaveCriticalSection(&critical);
}
if (!TestSynchCritical_TriggerAndCheckRaceCondition(hThread, rc))
return (PVOID)3;
return 3;
LeaveCriticalSection(&critical);
}
@@ -288,11 +288,11 @@ static DWORD WINAPI TestSynchCritical_Main(LPVOID arg)
CloseHandle(hThread);
*pbThreadTerminated = TRUE; /* requ. for winpr issue, see below */
return (PVOID)0;
return 0;
fail:
*pbThreadTerminated = TRUE; /* requ. for winpr issue, see below */
return (PVOID)1;
return 1;
}