diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2009-12-02 09:08:41 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-02 09:27:01 +0100 |
commit | bdad0db7dbdb37d0bb3c7d0f65cd3ff599ea6ecb (patch) | |
tree | a87d06eb673369d0f2cdbb20fb541b312b6d2bd5 /tools/perf/builtin-probe.c | |
parent | perf tools: Fix _GNU_SOURCE macro related strndup() build error (diff) | |
download | linux-bdad0db7dbdb37d0bb3c7d0f65cd3ff599ea6ecb.tar.xz linux-bdad0db7dbdb37d0bb3c7d0f65cd3ff599ea6ecb.zip |
perf_event: Fix compile error
Fix:
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>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4B162089.8000907@cn.fujitsu.com>
[ v2: use NO_LIBDWARF instead of __used ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index b5d15cf25471..a58e11b7ea80 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -160,7 +160,10 @@ 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; +#ifndef NO_LIBDWARF + int fd; +#endif struct probe_point *pp; argc = parse_options(argc, argv, options, probe_usage, |