[alsa-devel] ASoC: rsnd: fix sound route path when using SRC6/SRC9

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed May 17 09:38:53 CEST 2017


Hi Geert

> > Hmm....
> > I tried random code/compile, but gcc behavior seems strange.
> > Fore example if I removed next line, this warning disappeard
> >
> > -               data = path[rsnd_mod_id(src)] |
> > -                       cmd_case[rsnd_mod_id(src)] << 16;
> > +               data = path[rsnd_mod_id(src)];
> >
> > Is this related to this ?
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124
> 
> Perhaps.
> 
> I guess the main question is: can src be NULL here?
> If yes, rsnd_mod_id(src) will be -1.

No. cmd itself will not be used if src was NULL on this HW.
But, yes, it seems gcc is checking -1 value here.
It is OK, but why it warns only here ??

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list