lkml.org 
[lkml]   [2007]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git patches 2/2] warnings: use uninitialized_var()
On Tue, Jul 17, 2007 at 05:49:52PM -0400, Jeff Garzik wrote:
>
> For many months, I have maintained a hand-verified list of bogus "may be
> used uninitialized" warning fixes, in misc-2.6.git#gccbug. Andrew urged
> me to head these upstream.
>
> I have gone through and re-analyzed each warning, and verified that
> these variables are indeed initialized properly, and gcc is making
> needless noise.
>...

Some notes:
- if gcc can prove a variable gets used uninitialized it gives
a different warning
- gcc says it may be used uninitialized - there can always be false
positives when the correctness of the code is due to some higher
level logic
- I've seen cases in the kernel where it was technically impossible
for the compiler to verify a variable always gets initialized

So if we want these warnings we'll always need to silence the ones that
are verified as being correct code like your patches do - and that's not
gcc's fault.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-18 13:35    [W:0.265 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site