[Added Borislav and Sam to cc.] Christoph Hellwig schreef op wo 16-07-2014 om 10:58 [-0700]: > On Wed, Jul 16, 2014 at 08:08:41PM +0300, Boaz Harrosh wrote: > > This is the wrong fix. GCC is wrong here. As shown by Paul Bolle if > > you move the from / to set from dio_get_page() to here the warning goes away. > > > > The minimal fix must use uninitialized_var() in this case. See patch below > > > > But I think the proper fix Is the one Paul Bolle <pebolle@xxxxxxxxxx> sent (above) > > I don't think the initialization is wrong. The fix of moving the code > defintively looks nicer, Whether that was Jason's idea or mine doesn't matter much - though I do think Boaz quoted part of my fix, but it was just a _draft_. Anyhow, after all that I got involved in a short thread; https://lkml.org/lkml/2014/7/8/168 is my contribution. My point is, basically, that the false positives of -Wmaybe-uninitialized are a "code smell". They tend to disappear if one reorganizes the code a bit. Borislav disagrees quite strongly. I didn't really bother with keeping that thread alive because I feared we'd mainly see more colorful language. > while I think uninitialized_var is horrible wart Agree totally. > that won't get anywhere near my code. > > Either way we should merge one of those fixes ASAP.. I'd like my builds to be warning free too. And it would be nice to know whether there's consensus on how to deal with the false positives of -Wmaybe-uninitialized that make it into mainline. Paul Bolle -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html