Merge pull request #5174 from chipitsine/master
resolve several issues found by cppcheck
This commit is contained in:
commit
aa442de059
@ -93,11 +93,6 @@ static UINT audin_opensles_free(IAudinDevice* device)
|
||||
|
||||
WLog_Print(opensles->log, WLOG_DEBUG, "device=%p", (void*) device);
|
||||
|
||||
/* The function may have been called out of order,
|
||||
* ignore duplicate requests. */
|
||||
if (!opensles)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
free(opensles->device_name);
|
||||
free(opensles);
|
||||
return CHANNEL_RC_OK;
|
||||
@ -154,11 +149,6 @@ static UINT audin_opensles_set_format(IAudinDevice* device,
|
||||
(void*) device, (void*) format, FramesPerPacket);
|
||||
assert(format);
|
||||
|
||||
/* The function may have been called out of order, ignore
|
||||
* requests before the device is available. */
|
||||
if (!opensles)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
opensles->format = *format;
|
||||
|
||||
switch (format->wFormatTag)
|
||||
|
@ -1447,12 +1447,12 @@ static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc)
|
||||
{
|
||||
UINT status;
|
||||
|
||||
if (drdynvc->OpenHandle == 0)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
if (!drdynvc)
|
||||
return CHANNEL_RC_BAD_CHANNEL_HANDLE;
|
||||
|
||||
if (drdynvc->OpenHandle == 0)
|
||||
return CHANNEL_RC_OK;
|
||||
|
||||
if (!MessageQueue_PostQuit(drdynvc->queue, 0))
|
||||
{
|
||||
status = GetLastError();
|
||||
|
@ -797,9 +797,6 @@ void xf_floatbar_free(xfFloatbar* floatbar)
|
||||
xfc = floatbar->xfc;
|
||||
size = ARRAYSIZE(floatbar->buttons);
|
||||
|
||||
if (!floatbar)
|
||||
return;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
xf_floatbar_button_free(xfc, floatbar->buttons[i]);
|
||||
|
@ -1151,11 +1151,13 @@ BOOL freerdp_dsp_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* srcFor
|
||||
#else
|
||||
const BYTE* resampleData;
|
||||
size_t resampleLength;
|
||||
AUDIO_FORMAT format = *srcFormat;
|
||||
AUDIO_FORMAT format;
|
||||
|
||||
if (!context || !context->encoder || !srcFormat || !data || !out)
|
||||
return FALSE;
|
||||
|
||||
format = *srcFormat;
|
||||
|
||||
if (!freerdp_dsp_channel_mix(context, data, length, srcFormat, &resampleData, &resampleLength))
|
||||
return FALSE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user