[PATCH v3 3/5] perf: squelch warnings from perl.h to compile-pass
From: Ramkumar Ramachandra
Date: Tue Jul 09 2013 - 06:04:37 EST
Currently, a simple
$ make
errors out because we compile with -Werror by default, turning all
warnings into errors. Although no warnings are emitted by our code
itself, two kinds of warnings are emitted by perl.h (perl 5.18.0):
-Wundef and -Wswitch-default
Use #pragma statements to squelch exactly those warnings, making perf
compile-pass.
Helped-by: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
tools/perf/util/perl.h | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 tools/perf/util/perl.h
diff --git a/tools/perf/util/perl.h b/tools/perf/util/perl.h
new file mode 100644
index 0000000..862d08d
--- /dev/null
+++ b/tools/perf/util/perl.h
@@ -0,0 +1,10 @@
+#ifndef __PERF_PERL_H
+#define __PERF_PERL_H
+
+#pragma GCC diagnostic ignored "-Wundef"
+#pragma GCC diagnostic ignored "-Wswitch-default"
+#include_next <perl.h>
+#pragma GCC diagnostic error "-Wundef"
+#pragma GCC diagnostic error "-Wswitch-default"
+
+#endif
--
1.8.3.2.736.g869de25
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/