From: Xiao Guangrong Date: Wed, 2 Dec 2009 08:08:41 +0000 (+0800) Subject: perf_event: Fix compile error X-Git-Tag: v2.6.33-rc1~399^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdad0db7dbdb37d0bb3c7d0f65cd3ff599ea6ecb;p=thirdparty%2Fkernel%2Flinux.git 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 Cc: Masami Hiramatsu Cc: Peter Zijlstra LKML-Reference: <4B162089.8000907@cn.fujitsu.com> [ v2: use NO_LIBDWARF instead of __used ] Signed-off-by: Ingo Molnar --- diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index b5d15cf254710..a58e11b7ea800 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,