Re: sound/pci/asihpi/hpioctl.c:346:9: warning: missing braces around initializer
From: Takashi Iwai
Date: Sun Feb 14 2021 - 10:54:15 EST
On Sun, 14 Feb 2021 15:51:23 +0100,
kernel test robot wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: ac30d8ce28d61c05ac3a8b1452e889371136f3af
> commit: 472eb39103e885f302fd8fd6eff104fcf5503f1b ALSA: asihpi: fix iounmap in error handler
> date: 5 months ago
> config: i386-randconfig-a014-20200624 (attached as .config)
> compiler: gcc-4.9 (Ubuntu 4.9.3-13ubuntu2) 4.9.3
> reproduce (this is a W=1 build):
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=472eb39103e885f302fd8fd6eff104fcf5503f1b
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout 472eb39103e885f302fd8fd6eff104fcf5503f1b
> # save the attached .config to linux build tree
> make W=1 ARCH=i386
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
> All warnings (new ones prefixed by >>):
>
> sound/pci/asihpi/hpioctl.c: In function 'asihpi_adapter_probe':
> >> sound/pci/asihpi/hpioctl.c:346:9: warning: missing braces around initializer [-Wmissing-braces]
> struct hpi_pci pci = { 0 };
> ^
> sound/pci/asihpi/hpioctl.c:346:9: warning: (near initialization for 'pci.ap_mem_base') [-Wmissing-braces]
I guess it's rather a false-positive due to the old gcc version
(4.9).
Takashi