fixed unused-but-set-variable warnings

This commit is contained in:
akallabeth 2024-02-20 10:45:08 +01:00 committed by akallabeth
parent 05e555feb7
commit acedd305d3
9 changed files with 13 additions and 18 deletions

View File

@ -1398,7 +1398,6 @@ static BOOL xf_cliprdr_process_selection_request(xfClipboard* clipboard,
formatId = format->formatId;
rawTransfer = FALSE;
xfCachedData* cached_data = NULL;
xfCachedData* converted_data = NULL;
UINT32 dstFormatId = 0;
if (formatId == CF_RAW)
@ -1444,7 +1443,7 @@ static BOOL xf_cliprdr_process_selection_request(xfClipboard* clipboard,
cached_raw_data ? cached_raw_data->data_length : 0);
if (cached_raw_data && cached_raw_data->data_length != 0)
converted_data = cached_data = convert_data_from_existing_raw_data(
cached_data = convert_data_from_existing_raw_data(
clipboard, cached_raw_data, srcFormatId, nullTerminated, dstFormatId);
}

View File

@ -759,7 +759,6 @@ static BOOL freerdp_dsp_channel_mix(FREERDP_DSP_CONTEXT* context, const BYTE* sr
BOOL freerdp_dsp_ffmpeg_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT* format,
const BYTE* data, size_t length, wStream* out)
{
int rc = 0;
AUDIO_FORMAT fmt = { 0 };
if (!context || !format || !data || !out || !context->encoder)
@ -807,9 +806,12 @@ BOOL freerdp_dsp_ffmpeg_encode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT*
#else
const int channels = context->context->ch_layout.nb_channels;
#endif
rc = av_samples_copy(context->buffered->extended_data,
context->resampled->extended_data, (int)context->bufferedSamples,
copied, inSamples, channels, context->context->sample_fmt);
const int rc =
av_samples_copy(context->buffered->extended_data, context->resampled->extended_data,
(int)context->bufferedSamples, copied, inSamples, channels,
context->context->sample_fmt);
if (rc < 0)
return FALSE;
rest -= inSamples;
copied += inSamples;
context->bufferedSamples += (UINT32)inSamples;

View File

@ -1058,6 +1058,8 @@ static BOOL rdp_recv_monitor_layout_pdu(rdpRdp* rdp, wStream* s)
IFCALLRET(rdp->update->RemoteMonitors, ret, rdp->context, monitorCount, monitorDefArray);
free(monitorDefArray);
if (!ret)
return FALSE;
return rdp_set_monitor_layout_pdu_state(rdp, TRUE);
}

View File

@ -206,7 +206,6 @@ static BOOL prepare_certificates(const char* path)
char* exe = NULL;
DWORD status = 0;
STARTUPINFOA si = { 0 };
SECURITY_ATTRIBUTES saAttr = { 0 };
PROCESS_INFORMATION process = { 0 };
char commandLine[8192] = { 0 };
@ -218,9 +217,6 @@ static BOOL prepare_certificates(const char* path)
if (!exe)
return FALSE;
_snprintf(commandLine, sizeof(commandLine), "%s -format crt -path . -n server", exe);
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
rc = CreateProcessA(exe, commandLine, NULL, NULL, TRUE, 0, NULL, path, &si, &process);
free(exe);

View File

@ -531,7 +531,7 @@ fail:
gdi_DeleteDC(hdcSrc);
gdi_DeleteDC(hdcDst);
fprintf(stderr, "%s: TODO Test not implemented!!!\n", __func__);
return TRUE; // rc;
return rc;
}
int TestGdiBitBlt(int argc, char* argv[])

View File

@ -324,7 +324,7 @@ fail:
gdi_DeleteObject((HGDIOBJECT)rgn2);
gdi_DeleteObject((HGDIOBJECT)bmp);
gdi_DeleteDC(hdc);
return 0;
return rc;
}
int TestGdiClip(int argc, char* argv[])

View File

@ -161,9 +161,8 @@ static int test_alphaComp_speed(void)
BYTE ALIGN(src1[SRC1_WIDTH * SRC1_HEIGHT]) = { 0 };
BYTE ALIGN(src2[SRC2_WIDTH * SRC2_HEIGHT]) = { 0 };
BYTE ALIGN(dst1[DST_WIDTH * DST_HEIGHT]) = { 0 };
char testStr[256] = { 0 };
UINT32* ptr = NULL;
testStr[0] = '\0';
winpr_RAND(src1, sizeof(src1));
/* Special-case the first two values */
src1[0] &= 0x00FFFFFFU;

View File

@ -134,8 +134,7 @@ static BOOL test_or_32u_speed(void)
{
UINT32 ALIGN(src[FUNC_TEST_SIZE + 3]) = { 0 };
UINT32 ALIGN(dst[FUNC_TEST_SIZE + 3]) = { 0 };
char testStr[256];
testStr[0] = '\0';
winpr_RAND(src, sizeof(src));
if (!speed_test("add16s", "aligned", g_Iterations, (speed_test_fkt)generic->orC_32u,

View File

@ -696,7 +696,6 @@ static BOOL TestPrimitiveRgbToLumaChroma(primitives_t* prims, prim_size_t roi, U
UINT32 yuv_step[3];
BYTE* rgb = NULL;
size_t size = 0;
size_t uvsize = 0;
size_t uvwidth = 0;
const size_t padding = 0x1000;
UINT32 stride = 0;
@ -721,7 +720,6 @@ static BOOL TestPrimitiveRgbToLumaChroma(primitives_t* prims, prim_size_t roi, U
stride = awidth * sizeof(UINT32);
size = awidth * aheight;
uvwidth = (awidth + 1) / 2;
uvsize = (aheight + 1) / 2 * uvwidth;
if (!prims || !generic)
return FALSE;