Em Fri, 18 Dec 2015 16:52:40 +0000 David Howells <dhowells@xxxxxxxxxx> escreveu: > Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> 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 <mchehab@xxxxxxxxxxxxxxx> > > 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 <dhowells@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html