diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-16 08:36:32 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-04-16 08:44:28 -0400 |
commit | ccd62a896ffe3dbd60f3b7570a2b74e4fe030ed6 (patch) | |
tree | 07f5c7d29156333a00c97aa59f0c351e5f6e2904 | |
parent | 9243ae5b28d02dc7d71a4f00c981ef6feaede3f1 (diff) |
perf trace: Fix build when DWARF unwind isn't available
The variable is initialized and then conditionally set to a different
value, but not used when DWARF unwinding is not available, bummer, write
1000 times: "Run make -C tools/perf build-test"...
builtin-trace.c: In function ‘cmd_trace’:
builtin-trace.c:3112:6: error: variable ‘max_stack_user_set’ set but not
used [-Werror=unused-but-set-variable]
bool max_stack_user_set = true;
^
cc1: all warnings being treated as err
Fix it by marking it as __maybe_unused.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 056149932602 ("perf trace: Make --(min,max}-stack imply "--call-graph dwarf"")
Link: http://lkml.kernel.org/n/tip-85r40c5hhv6jnmph77l1hgsr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 026ec0c749b0..0e3c1cecef1b 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -3109,7 +3109,7 @@ int cmd_trace(int argc, const char **argv, const char *prefix __maybe_unused) | |||
3109 | "per thread proc mmap processing timeout in ms"), | 3109 | "per thread proc mmap processing timeout in ms"), |
3110 | OPT_END() | 3110 | OPT_END() |
3111 | }; | 3111 | }; |
3112 | bool max_stack_user_set = true; | 3112 | bool __maybe_unused max_stack_user_set = true; |
3113 | bool mmap_pages_user_set = true; | 3113 | bool mmap_pages_user_set = true; |
3114 | const char * const trace_subcommands[] = { "record", NULL }; | 3114 | const char * const trace_subcommands[] = { "record", NULL }; |
3115 | int err; | 3115 | int err; |