Testbench: Fix possible uninitialized use of variable ret

This patch fixes the read_samples_32() function in file component.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
Seppo Ingalsuo 2020-03-16 19:19:34 +02:00 committed by Liam Girdwood
parent 0eeda80bdf
commit dc44384ea0
1 changed files with 4 additions and 1 deletions

View File

@ -49,8 +49,11 @@ static int read_samples_32(struct comp_dev *dev,
struct file_comp_data *cd = comp_get_drvdata(dev); struct file_comp_data *cd = comp_get_drvdata(dev);
int32_t *dest = (int32_t *)sink->w_ptr; int32_t *dest = (int32_t *)sink->w_ptr;
int32_t sample; int32_t sample;
int n_wrap;
int n_min;
int i;
int n_samples = 0; int n_samples = 0;
int i, n_wrap, n_min, ret; int ret = 0;
while (n > 0) { while (n > 0) {
n_wrap = (int32_t *)sink->end_addr - dest; n_wrap = (int32_t *)sink->end_addr - dest;