[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373364033-7918-4-git-send-email-artagnon@gmail.com>
Date: Tue, 9 Jul 2013 15:30:31 +0530
From: Ramkumar Ramachandra <artagnon@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH v3 3/5] perf: squelch warnings from perl.h to compile-pass
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@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@...il.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists