Re: [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning

From: Kuninori Morimoto
Date: Fri Apr 24 2020 - 00:34:42 EST



Hi

> gcc-6.5 and earlier show a new warning:
>
> sound/soc/soc-compress.c: In function ʽsoc_compr_openʼ:
> sound/soc/soc-compress.c:75:28: warning: ʽcomponentʼ is used uninitialized in this function [-Wuninitialized]
> struct snd_soc_component *component, *save = NULL;
> ^~~~~~~~~
>
> Simplest fix is to initialize it to avoid the warning.
>
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@xxxxxxxxx
> Signed-off-by: Rong Chen <rong.a.chen@xxxxxxxxx>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

Thank you for your help !!

Best regards
---
Kuninori Morimoto