summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-10-12 16:08:07 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-10-15 11:25:15 +0200
commit37b47298ab864fb3f5488ddebfc35267ceab0553 (patch)
treea156ebd296c01d670825e34dfedb9f1029c35dfb /kernel/sched
parent42a20f86dc19f9282d974df0ba4d226c865ab9dd (diff)
downloadlinux-37b47298ab864fb3f5488ddebfc35267ceab0553.tar.bz2
sched: Disable -Wunused-but-set-variable
The compilers can't deal with obvious DCE vs that warning, resulting in code like: if (0) { sched sched_statistics *stats; stats = __schedstats_from_se(se); ... } triggering the warning. Kill the warning to make the robots stop reporting this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Link: https://lkml.kernel.org/r/YWWPLnaZGybHsTkv@hirez.programming.kicks-ass.net
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched/Makefile b/kernel/sched/Makefile
index 978fcfca5871..c7421f2d05e1 100644
--- a/kernel/sched/Makefile
+++ b/kernel/sched/Makefile
@@ -3,6 +3,10 @@ ifdef CONFIG_FUNCTION_TRACER
CFLAGS_REMOVE_clock.o = $(CC_FLAGS_FTRACE)
endif
+# The compilers are complaining about unused variables inside an if(0) scope
+# block. This is daft, shut them up.
+ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
+
# These files are disabled because they produce non-interesting flaky coverage
# that is not a function of syscall inputs. E.g. involuntary context switches.
KCOV_INSTRUMENT := n