Em Fri, 18 Dec 2015 16:52:40 +0000
David Howells <dhowe...@redhat.com> escreveu:

> Mauro Carvalho Chehab <mche...@osg.samsung.com> wrote:
> 
> > Smatch complains about where the au8293_data is placed:
> > 
> > drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 
> > 'a8293_pdata' is not actually initialized (unreached code).
> > 
> > It is not actually expected to have such initialization at
> > 
> > switch {
> >     foo = bar;
> > 
> >     case:
> > ...
> > }
> > 
> > Not really sure how gcc does that, but this is something that I would
> > expect that different compilers would do different things.
> > 
> > So, move the initialization outside the switch(), making smatch to
> > shut up one warning.
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
> 
> Yeah - checked with the compiler people: it's not really expected to
> initialise as expected.

Thank you for checking it! Yeah, the above code weren't smelling
well ;) Good to know for sure that such constructions may not be
doing what humans would expect...
 
> Acked-by: David Howells <dhowe...@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to