Skip to content

Commit f77b4a5

Browse files
authored
Merge pull request FreeRDP#3796 from akallabeth/scan_warning_fixes_v2
Scan warning fixes v2
2 parents e358678 + b574e19 commit f77b4a5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3122
-2617
lines changed

channels/audin/client/alsa/audin_alsa.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ static UINT audin_alsa_thread_receive(AudinALSADevice* alsa, BYTE* src,
138138
frames = alsa->dsp_context->resampled_frames;
139139
DEBUG_DVC("resampled %d frames at %"PRIu32" to %d frames at %"PRIu32"",
140140
size / rbytes_per_frame, alsa->actual_rate, frames, alsa->target_rate);
141-
size = frames * tbytes_per_frame;
142141
src = alsa->dsp_context->resampled_buffer;
143142
}
144143

@@ -225,14 +224,11 @@ static void* audin_alsa_thread_func(void* arg)
225224
long error;
226225
BYTE* buffer;
227226
int rbytes_per_frame;
228-
int tbytes_per_frame;
229227
snd_pcm_t* capture_handle = NULL;
230228
AudinALSADevice* alsa = (AudinALSADevice*) arg;
231229
DWORD status;
232230
DEBUG_DVC("in");
233-
234231
rbytes_per_frame = alsa->actual_channels * alsa->bytes_per_channel;
235-
tbytes_per_frame = alsa->target_channels * alsa->bytes_per_channel;
236232
buffer = (BYTE*) calloc(1, rbytes_per_frame * alsa->frames_per_packet);
237233

238234
if (!buffer)
@@ -502,6 +498,10 @@ static UINT audin_alsa_parse_addin_args(AudinALSADevice* device,
502498
COMMAND_LINE_IGN_UNKNOWN_KEYWORD;
503499
status = CommandLineParseArgumentsA(args->argc, (const char**) args->argv,
504500
audin_alsa_args, flags, alsa, NULL, NULL);
501+
502+
if (status < 0)
503+
return ERROR_INVALID_PARAMETER;
504+
505505
arg = audin_alsa_args;
506506

507507
do

0 commit comments

Comments
 (0)