diff -urN oldtree/include/linux/types.h newtree/include/linux/types.h --- oldtree/include/linux/types.h 2006-06-27 12:22:04.000000000 +0000 +++ newtree/include/linux/types.h 2006-06-27 13:12:55.811089250 +0000 @@ -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-06-27 12:22:04.000000000 +0000 +++ newtree/lib/Kconfig.debug 2006-06-27 13:12:55.835090750 +0000 @@ -353,6 +353,22 @@ become the default in the future, until then this option is there to test gcc for this. +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