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

From: Mark Brown
Date: Thu Apr 23 2020 - 09:49:29 EST


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.

Attachment: signature.asc
Description: PGP signature