Re: [PATCH v2 2/2] ALSA: usb: initial USB Audio Device Class 3.0 support

From: Takashi Iwai
Date: Mon Mar 19 2018 - 12:20:42 EST


On Mon, 19 Mar 2018 14:43:29 +0100,
kbuild test robot wrote:
>
> Hi Ruslan,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on linus/master]
> [also build test WARNING on v4.16-rc6 next-20180316]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Ruslan-Bilovol/ALSA-usb-audio-move-audioformat-quirks-to-quirks-c/20180319-205541
> config: i386-randconfig-x016-201811 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=i386
>
> Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
> http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
>
> All warnings (new ones prefixed by >>):
>
> sound/usb/stream.c: In function 'snd_usb_parse_audio_interface':
> >> sound/usb/stream.c:956:8: warning: 'fmt' may be used uninitialized in this function [-Wmaybe-uninitialized]
> if (snd_usb_parse_audio_format(chip, fp, format,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> fmt, stream) < 0) {
> ~~~~~~~~~~~~

Hm, this looks like a false-postive, although I see it on my local
build, too.

I'm not always a fan of unneeded initialization, but this time, we can
be lazy and add a NULL initialization...


thanks,

Takashi