diff -urN oldtree/include/linux/types.h newtree/include/linux/types.h --- oldtree/include/linux/types.h 2006-07-05 10:06:57.000000000 -0400 +++ newtree/include/linux/types.h 2006-07-06 06:55:01.000000000 -0400 @@ -193,4 +193,15 @@ char f_fpack[6]; }; +#ifdef CONFIG_HIDE_FALSE_POSITIVES +/* + * No parentheses around x = x because + * int (i=i); + * doesn't compile. + */ +# define uninit_var(x) x = x +#else +# define uninit_var(x) x +#endif + #endif /* _LINUX_TYPES_H */ diff -urN oldtree/lib/Kconfig.debug newtree/lib/Kconfig.debug --- oldtree/lib/Kconfig.debug 2006-07-05 10:06:57.000000000 -0400 +++ newtree/lib/Kconfig.debug 2006-07-06 06:55:01.000000000 -0400 @@ -399,6 +399,22 @@ See Documentation/synchro-test.txt. +config HIDE_FALSE_POSITIVES + bool "Hide gcc false positives of unititialized variables" + depends on DEBUG_KERNEL + help + gcc sometimes shows that a variable is uninitialized when the logic + actually does initialize it before use. The kernel has lots of these + warnings. This option hides those warnings that were actually looked + at by a human, and decided (right or wrong) that this variable is indeed + properly initialized. + + If you are a developer that doesn't care about these warnings, and trust + that the one that marked these variables, did so correctly. Then you + may turn on this option, to look for your own mistakes. + + Otherwise, say N + config RCU_TORTURE_TEST tristate "torture tests for RCU" depends on DEBUG_KERNEL