ipc4: helper: Remove unused sink_cfg from ipc4_create_buffer()

Compilation fails with gcc:

src/ipc/ipc4/helper.c: In function 'ipc4_create_buffer':
src/ipc/ipc4/helper.c:210:41: error: variable 'sink_cfg' set but not used [-Werror=unused-but-set-variable]
  210 |  struct ipc4_base_module_cfg *src_cfg, *sink_cfg;
      |                                         ^~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:394: CMakeFiles/sof.dir/src/ipc/ipc4/helper.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2042: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This commit is contained in:
Peter Ujfalusi 2022-03-25 15:02:58 +02:00 committed by Liam Girdwood
parent 04ff2f99e2
commit d5aa222e5d
1 changed files with 1 additions and 2 deletions

View File

@ -207,13 +207,12 @@ int ipc_pipeline_free(struct ipc *ipc, uint32_t comp_id)
static struct comp_buffer *ipc4_create_buffer(struct comp_dev *src, struct comp_dev *sink,
uint32_t src_queue, uint32_t dst_queue)
{
struct ipc4_base_module_cfg *src_cfg, *sink_cfg;
struct ipc4_base_module_cfg *src_cfg;
struct comp_buffer *buffer = NULL;
struct sof_ipc_buffer ipc_buf;
int buf_size;
src_cfg = (struct ipc4_base_module_cfg *)comp_get_drvdata(src);
sink_cfg = (struct ipc4_base_module_cfg *)comp_get_drvdata(sink);
/* double it since obs is single buffer size */
buf_size = src_cfg->obs * 2;