pcm_converter: fix uninitialised variables

Two variables i and n in pcm_convert_s24_c32_to_s24_c24_link_gtw()
can be used uninitialised, which breaks compilation. Initialise them
to 0 which guarantees, that we don't perform any changes in the
invalid case of processed >= samples.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2022-03-04 14:32:50 +01:00 committed by Liam Girdwood
parent 41f171709d
commit 2ea18383b3
1 changed files with 1 additions and 1 deletions

View File

@ -747,7 +747,7 @@ static int pcm_convert_s24_c32_to_s24_c24_link_gtw(const struct audio_stream *so
int32_t *src = source->r_ptr;
uint16_t *dst = sink->w_ptr;
int processed;
int nmax, i, n;
int nmax, i = 0, n = 0;
src += ioffset;
assert(ooffset == 0);