Merge pull request #10674 from akallabeth/unused-eliminate

Unused eliminate
This commit is contained in:
akallabeth
2024-09-24 20:07:34 +02:00
committed by GitHub
7 changed files with 17 additions and 21 deletions

View File

@@ -1395,9 +1395,6 @@ static DWORD WINAPI sdl_client_thread_proc(SdlContext* sdl)
{
WINPR_ASSERT(sdl);
auto instance = sdl->context()->instance;
WINPR_ASSERT(instance);
std::string error_msg;
int exit_code = sdl_client_thread_connect(sdl, error_msg);
if (exit_code == SDL_EXIT_SUCCESS)

View File

@@ -178,8 +178,8 @@ static BOOL sdl_Pointer_SetNull(rdpContext* context)
static BOOL sdl_Pointer_SetPosition(rdpContext* context, UINT32 x, UINT32 y)
{
auto sdl = get_context(context);
WINPR_ASSERT(sdl);
WINPR_UNUSED(context);
WINPR_ASSERT(context);
return sdl_push_user_event(SDL_USEREVENT_POINTER_POSITION, x, y);
}

View File

@@ -1379,9 +1379,6 @@ static DWORD WINAPI sdl_client_thread_proc(SdlContext* sdl)
{
WINPR_ASSERT(sdl);
auto instance = sdl->context()->instance;
WINPR_ASSERT(instance);
std::string error_msg;
int exit_code = sdl_client_thread_connect(sdl, error_msg);
if (exit_code == SDL_EXIT_SUCCESS)

View File

@@ -176,8 +176,8 @@ static BOOL sdl_Pointer_SetNull(rdpContext* context)
static BOOL sdl_Pointer_SetPosition(rdpContext* context, UINT32 x, UINT32 y)
{
auto sdl = get_context(context);
WINPR_ASSERT(sdl);
WINPR_UNUSED(context);
WINPR_ASSERT(context);
return sdl_push_user_event(SDL_EVENT_USER_POINTER_POSITION, x, y);
}

View File

@@ -1183,6 +1183,9 @@ fail:
void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context)
{
if (!context)
return;
#if defined(WITH_FDK_AAC)
FREERDP_DSP_COMMON_CONTEXT* ctx = (FREERDP_DSP_COMMON_CONTEXT*)context;
WINPR_ASSERT(ctx);
@@ -1193,9 +1196,7 @@ void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context)
freerdp_dsp_ffmpeg_context_free(context);
#else
if (context)
{
freerdp_dsp_common_context_uninit(&context->common);
freerdp_dsp_common_context_uninit(&context->common);
#if defined(WITH_GSM)
gsm_destroy(context->gsm);
@@ -1231,8 +1232,7 @@ void freerdp_dsp_context_free(FREERDP_DSP_CONTEXT* context)
#if defined(WITH_SOXR)
soxr_delete(context->sox);
#endif
free(context);
}
free(context);
#endif
}

View File

@@ -440,6 +440,8 @@ static BOOL rdstls_cmp_str(wLog* log, const char* field, const char* serverStr,
return FALSE;
}
WINPR_ASSERT(serverStr);
WINPR_ASSERT(clientStr);
if (strcmp(serverStr, clientStr) != 0)
{
WLog_Print(log, WLOG_ERROR, "%s verification failed", field);

View File

@@ -247,7 +247,7 @@ static BOOL demo_mouse_event(proxyPlugin* plugin, proxyData* pdata, void* param)
WINPR_ASSERT(pdata);
WINPR_ASSERT(event_data);
WLog_INFO(TAG, "called");
WLog_INFO(TAG, "called %p", event_data);
return TRUE;
}
@@ -259,7 +259,7 @@ static BOOL demo_mouse_ex_event(proxyPlugin* plugin, proxyData* pdata, void* par
WINPR_ASSERT(pdata);
WINPR_ASSERT(event_data);
WLog_INFO(TAG, "called");
WLog_INFO(TAG, "called %p", event_data);
return TRUE;
}
@@ -309,7 +309,7 @@ static BOOL demo_server_fetch_target_addr(proxyPlugin* plugin, proxyData* pdata,
WINPR_ASSERT(pdata);
WINPR_ASSERT(event_data);
WLog_INFO(TAG, "called");
WLog_INFO(TAG, "called %p", event_data);
return TRUE;
}
@@ -333,7 +333,7 @@ static BOOL demo_dyn_channel_intercept_list(proxyPlugin* plugin, proxyData* pdat
WINPR_ASSERT(pdata);
WINPR_ASSERT(data);
WLog_INFO(TAG, "%s", __func__);
WLog_INFO(TAG, "%s: %p", __func__, data);
return TRUE;
}
@@ -345,7 +345,7 @@ static BOOL demo_static_channel_intercept_list(proxyPlugin* plugin, proxyData* p
WINPR_ASSERT(pdata);
WINPR_ASSERT(data);
WLog_INFO(TAG, "%s", __func__);
WLog_INFO(TAG, "%s: %p", __func__, data);
return TRUE;
}
@@ -357,7 +357,7 @@ static BOOL demo_dyn_channel_intercept(proxyPlugin* plugin, proxyData* pdata, vo
WINPR_ASSERT(pdata);
WINPR_ASSERT(data);
WLog_INFO(TAG, "%s", __func__);
WLog_INFO(TAG, "%s: %p", __func__, data);
return TRUE;
}