[alsa-devel] [PATCH v2] ALSA: usb-audio: fix Line6 Helix audio format rates

Takashi Iwai tiwai at suse.de
Sun Jul 7 11:27:20 CEST 2019


On Sun, 07 Jul 2019 10:27:34 +0200,
Nicola Lunghi wrote:
> @@ -294,7 +321,7 @@ static int parse_audio_format_rates_v2v3(struct snd_usb_audio *chip,
>  {
>  	struct usb_device *dev = chip->dev;
>  	unsigned char tmp[2], *data;
> -	int nr_triplets, data_size, ret = 0;
> +	int nr_triplets, data_size, ret, ret_l6 = 0;

This caused a compile warning:
  sound/usb/format.c: In function ‘parse_audio_format_rates_v2v3’:
  sound/usb/format.c:337:30: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    int nr_triplets, data_size, ret, ret_l6 = 0;
                                ^~~
				
So I applied with a fix, keeping ret = 0 while dropping the
superfluous zero initialization for ret_l6.


thanks,

Takashi


More information about the Alsa-devel mailing list