[PATCH] perf tools: Revert the -Wswitch-enum flag

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Frederic Weisbecker
Date: Sunday, August 16, 2009 - 5:53 am

-Wswitch-enum warns when a switch statement doesn't handle
every enum values of a given type.

But it also warns whn we have a default case where we handle them.
This forces workarounds like having a rain of ignored enum values
cases falling down to the default case.

We want to be sure that every cases are handled (which is what does
-Wswitch-default), but we don't want to explicitly write what must
fall down to the default case.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
---
 tools/perf/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d637aea..c7c2645 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -169,7 +169,7 @@ endif
 #
 # Include saner warnings here, which can catch bugs:
 #
-EXTRA_WARNINGS = -Wcast-align -Wformat=2 -Wshadow -Winit-self -Wpacked -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch-default -Wswitch-enum -Wno-system-headers -Wundef -Wvolatile-register-var -Wwrite-strings -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement
+EXTRA_WARNINGS = -Wcast-align -Wformat=2 -Wshadow -Winit-self -Wpacked -Wredundant-decls -Wstack-protector -Wstrict-aliasing=3 -Wswitch-default -Wno-system-headers -Wundef -Wvolatile-register-var -Wwrite-strings -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement
 
 CFLAGS = $(M64) -ggdb3 -Wall -Wextra -std=gnu99 -Werror -O6 -fstack-protector-all -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS)
 LDFLAGS = -lpthread -lrt -lelf -lm
-- 
1.6.2.3

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[tip:perfcounters/core] perf: Enable more compiler warnings, tip-bot for Ingo Molnar, (Sun Aug 16, 1:57 am)
Re: [tip:perfcounters/core] perf: Enable more compiler war ..., Frederic Weisbecker, (Sun Aug 16, 5:46 am)
[PATCH] perf tools: Revert the -Wswitch-enum flag, Frederic Weisbecker, (Sun Aug 16, 5:53 am)
Re: [tip:perfcounters/core] perf: Enable more compiler war ..., Frederic Weisbecker, (Sun Aug 16, 7:06 am)
Re: [tip:perfcounters/core] perf: Enable more compiler war ..., Frederic Weisbecker, (Sun Aug 16, 7:15 am)
[PATCH] perf tools: Substract -Wformat-nonliteral from Wfo ..., Frederic Weisbecker, (Sun Aug 16, 8:52 am)
[tip:perfcounters/core] perf tools: Substract -Wformat-non ..., tip-bot for Frederic ..., (Sun Aug 16, 9:00 am)