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

Mark Brown broonie at kernel.org
Thu Apr 23 15:49:24 CEST 2020


On Wed, Apr 22, 2020 at 03:35:43PM +0800, Rong Chen wrote:
> 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.

This doesn't apply against current code, please check and resend.  TBH
I'm not 100% sure the benefit here is worth it, this is a very old
compiler and it seems like a bug in the compiler.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200423/84a327b6/attachment.sig>


More information about the Alsa-devel mailing list