This patch fixes the warning messages shown with gcc option -Wextra.
Signed-off-by: Seppo Ingalsuo seppo.ingalsuo@linux.intel.com --- src/audio/src.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/src/audio/src.c b/src/audio/src.c index 3fd9614..3723b4e 100644 --- a/src/audio/src.c +++ b/src/audio/src.c @@ -65,8 +65,7 @@ struct comp_data { void (*src_func)(struct comp_dev *dev, struct comp_buffer *source, struct comp_buffer *sink, - uint32_t source_frames, - uint32_t sink_frames); + int source_frames); };
/* Common mute function for 2s and 1s SRC. This preserves the same @@ -113,8 +112,7 @@ static void src_muted_s32(struct comp_buffer *source, struct comp_buffer *sink, static void fallback_s32(struct comp_dev *dev, struct comp_buffer *source, struct comp_buffer *sink, - uint32_t source_frames, - uint32_t sink_frames) + int source_frames) {
struct comp_data *cd = comp_get_drvdata(dev); @@ -129,7 +127,7 @@ static void fallback_s32(struct comp_dev *dev, /* Normal 2 stage SRC */ static void src_2s_s32_default(struct comp_dev *dev, struct comp_buffer *source, struct comp_buffer *sink, - uint32_t source_frames, uint32_t sink_frames) + int source_frames) { int i; int j; @@ -203,7 +201,7 @@ static void src_2s_s32_default(struct comp_dev *dev, /* 1 stage SRC for simple conversions */ static void src_1s_s32_default(struct comp_dev *dev, struct comp_buffer *source, struct comp_buffer *sink, - uint32_t source_frames, uint32_t sink_frames) + int source_frames) { int i; int j; @@ -440,7 +438,7 @@ static int src_params(struct comp_dev *dev) * be too long. */ q = need.blk_out / dev->frames; - if (q * dev->frames < need.blk_out) + if (q * (int)dev->frames < need.blk_out) ++q;
if (q * dev->frames < need.blk_out + dev->frames) @@ -543,9 +541,9 @@ static int src_copy(struct comp_dev *dev) need_sink = blk_out * dev->frame_bytes;
/* Run as many times as buffers allow */ - while ((source->avail >= need_source) && (sink->free >= need_sink)) { + while (((int)source->avail >= need_source) && ((int)sink->free >= need_sink)) { /* Run src */ - cd->src_func(dev, source, sink, blk_in, blk_out); + cd->src_func(dev, source, sink, blk_in);
/* calc new free and available */ comp_update_buffer_consume(source, 0);