aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-08-15 01:43:18 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:39 -0400
commitcebc04ba9aeb3a646cc746300421fc0e5aa4f253 (patch)
treea2f47e375960efefd06fd4c3790184f34bd18b6f
parent4a7fb6363f2d1a6c09a10253937f672f3c7929e1 (diff)
add CONFIG_ENABLE_MUST_CHECK
Those 1500 warnings can be a bit of a pain. Add a config option to shut them up. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--include/linux/compiler.h5
-rw-r--r--lib/Kconfig.debug7
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 9b4f11094937..060b96112ec6 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -99,6 +99,11 @@ extern void __chk_io_ptr(void __iomem *);
99#define __must_check 99#define __must_check
100#endif 100#endif
101 101
102#ifndef CONFIG_ENABLE_MUST_CHECK
103#undef __must_check
104#define __must_check
105#endif
106
102/* 107/*
103 * Allow us to avoid 'defined but not used' warnings on functions and data, 108 * Allow us to avoid 'defined but not used' warnings on functions and data,
104 * as well as force them to be emitted to the assembly file. 109 * as well as force them to be emitted to the assembly file.
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 554ee688a9f8..5c114c3f03c5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -8,6 +8,13 @@ config PRINTK_TIME
8 operations. This is useful for identifying long delays 8 operations. This is useful for identifying long delays
9 in kernel startup. 9 in kernel startup.
10 10
11config ENABLE_MUST_CHECK
12 bool "Enable __must_check logic"
13 default y
14 help
15 Enable the __must_check logic in the kernel build. Disable this to
16 suppress the "warning: ignoring return value of 'foo', declared with
17 attribute warn_unused_result" messages.
11 18
12config MAGIC_SYSRQ 19config MAGIC_SYSRQ
13 bool "Magic SysRq key" 20 bool "Magic SysRq key"