From: Ingo Molnar <mingo@elte.hu>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@redhat.com>
Subject: Re: [PATCH] perf_event: fix compile error
Date: Wed, 2 Dec 2009 09:28:08 +0100 [thread overview]
Message-ID: <20091202082808.GA29866@elte.hu> (raw)
In-Reply-To: <4B16239B.90205@cn.fujitsu.com>
* Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> wrote:
> Ingo Molnar wrote:
> > * Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> wrote:
> >
> >> cc1: warnings being treated as errors
> >> builtin-probe.c: In function ???cmd_probe???:
> >> builtin-probe.c:163: error: unused variable ???fd???
> >>
> >> Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
> >> ---
> >> tools/perf/builtin-probe.c | 3 ++-
> >> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> >> index b5d15cf..64ea038 100644
> >> --- a/tools/perf/builtin-probe.c
> >> +++ b/tools/perf/builtin-probe.c
> >> @@ -160,7 +160,8 @@ static const struct option options[] = {
> >>
> >> int cmd_probe(int argc, const char **argv, const char *prefix __used)
> >> {
> >> - int i, j, fd, ret;
> >> + int i, j, ret;
> >> + int fd __used;
> >> struct probe_point *pp;
> >
> > i think it's better to initialize it to -1 instead of turning off the
> > warning.
> >
>
> Hi Ingo,
>
> I have try this way but the error still exists :-(
ah - unused, not uninitialized.
Then the right fix is to use NO_LIBDWARF, not __used annotation. I've
changed it to that and committed your fix - thanks!
Ingo
next prev parent reply other threads:[~2009-12-02 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-02 8:08 [PATCH] perf_event: fix compile error Xiao Guangrong
2009-12-02 8:17 ` Ingo Molnar
2009-12-02 8:21 ` Xiao Guangrong
2009-12-02 8:28 ` Ingo Molnar [this message]
2009-12-02 8:31 ` [tip:perf/core] perf_event: Fix " tip-bot for Xiao Guangrong
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=20091202082808.GA29866@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=xiaoguangrong@cn.fujitsu.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.