public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH v3 3/5] perf: squelch warnings from perl.h to compile-pass
Date: Tue,  9 Jul 2013 15:30:31 +0530	[thread overview]
Message-ID: <1373364033-7918-4-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1373364033-7918-1-git-send-email-artagnon@gmail.com>

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@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.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


  parent reply	other threads:[~2013-07-09 10:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-09 10:00 [PATCH v3 0/5] Minor perf build fixes Ramkumar Ramachandra
2013-07-09 10:00 ` [PATCH v3 1/5] perf/Makefile: do not open-code shell-sq Ramkumar Ramachandra
2013-07-09 10:00 ` [PATCH v3 2/5] perf/Perf-Trace-Util: fix broken include in Context.xs Ramkumar Ramachandra
2013-07-12  8:52   ` [tip:perf/urgent] perf script: Fix " tip-bot for Ramkumar Ramachandra
2013-07-09 10:00 ` Ramkumar Ramachandra [this message]
     [not found]   ` <20130710171640.GA2758@ghostprotocols.net>
2013-07-10 17:22     ` [PATCH v3 3/5] perf: squelch warnings from perl.h to compile-pass Ramkumar Ramachandra
2013-07-09 10:00 ` [PATCH v3 4/5] perf/Perf-Trace-Util: regenerate Context.c Ramkumar Ramachandra
2013-07-09 10:00 ` [PATCH v3 5/5] perf/Perf-Trace-Util: add .gitignore Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1373364033-7918-4-git-send-email-artagnon@gmail.com \
    --to=artagnon@gmail.com \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox