Messages in this thread | | | Date | Wed, 16 Jul 2014 10:58:03 -0700 | From | Christoph Hellwig <> | Subject | Re: [PATCH] fs/direct-io.c: Fix compilation warning for uninitialized variables |
| |
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@tiscali.nl> sent (above)
I don't think the initialization is wrong. The fix of moving the code defintively looks nicer, while I think uninitialized_var is horrible wart that won't get anywhere near my code.
Either way we should merge one of those fixes ASAP..
| |