On 03/10/2016 04:45 PM, Remy Horton wrote: > > On 10/03/2016 13:42, Panu Matilainen wrote: >> On 02/25/2016 08:48 PM, Aaron Conole wrote: >>> Silence a compiler warning that this variable may be used uninitialized. >>> >>> Signed-off-by: Aaron Conole <aconole at redhat.com> > [..] >> >> The patch looks ok as such, but then again warning looks like a false >> positive to me: assignment and dereferencing depend on the same value of >> eop, which cannot change between the two. > > In two minds about this. It is a logical impossibility, but these days > optimising compilers are getting very aggressive. For instance GCC has a > delightfully-named -fdelete-null-pointer-checks option, which caused > security holes..
Indeed, that's why silencing a false positive (assuming it actually is one) by throwing some more NULL-checks for the allegedly impossible makes me a bit nervous. Besides compiler optimizations going crazy, I've seen such extra NULL-checks turn into actual bugs when surroundings subtly change. - Panu -