Re: [kbuild-all] Re: sound/soc/soc-compress.c:75:28: warning: 'component' is used uninitialized in this function

From: Rong Chen
Date: Tue Apr 21 2020 - 21:18:05 EST




On 4/21/20 2:23 PM, Kuninori Morimoto wrote:
Hi

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7a56db0299f9d43b4fe076838150c5cc293df131
commit: 613fb50059cf19aa6acbc503a00265d9151c0b09 ASoC: soc-core: remove snd_soc_rtdcom_list
date: 3 months ago
config: i386-randconfig-a002-20200420 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
git checkout 613fb50059cf19aa6acbc503a00265d9151c0b09
# save the attached .config to linux build tree
make ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

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;
^~~~~~~~~
Hmm... I still can't reproduce this issue.
I don't have gcc-6, thus can't try it.
Is this the issue ??

Hi Kuninori,

We can reproduce the warning with gcc-6 (gcc version 6.5.0 20181026 (Debian 6.5.0-2)),
and the warning can be closed if changed to "struct snd_soc_component *component = NULL, *save = NULL;"

Best Regards,
Rong Chen