diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-07-01 06:37:06 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-07-01 06:49:48 -0400 |
commit | f37a291c527c954df4da568de718ebb36b8261c0 (patch) | |
tree | bb4863fbd185fbfef5f7d28cb4001d59d4123a2d /tools/perf/builtin-top.c | |
parent | 88a69dfbc6ab1e3b51bba8c9103055e21089ebb9 (diff) |
perf_counter tools: Add more warnings and fix/annotate them
Enable -Wextra. This found a few real bugs plus a number
of signed/unsigned type mismatches/uncleanlinesses. It
also required a few annotations
All things considered it was still worth it so lets try with
this enabled for now.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 0506cd6e04cc..5f5e7df8302d 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c | |||
@@ -269,7 +269,7 @@ static void print_sym_table(void) | |||
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | static void *display_thread(void *arg) | 272 | static void *display_thread(void *arg __used) |
273 | { | 273 | { |
274 | struct pollfd stdin_poll = { .fd = 0, .events = POLLIN }; | 274 | struct pollfd stdin_poll = { .fd = 0, .events = POLLIN }; |
275 | int delay_msecs = delay_secs * 1000; | 275 | int delay_msecs = delay_secs * 1000; |
@@ -287,7 +287,7 @@ static void *display_thread(void *arg) | |||
287 | } | 287 | } |
288 | 288 | ||
289 | /* Tag samples to be skipped. */ | 289 | /* Tag samples to be skipped. */ |
290 | char *skip_symbols[] = { | 290 | static const char *skip_symbols[] = { |
291 | "default_idle", | 291 | "default_idle", |
292 | "cpu_idle", | 292 | "cpu_idle", |
293 | "enter_idle", | 293 | "enter_idle", |
@@ -426,7 +426,7 @@ static void process_event(u64 ip, int counter, int user) | |||
426 | struct mmap_data { | 426 | struct mmap_data { |
427 | int counter; | 427 | int counter; |
428 | void *base; | 428 | void *base; |
429 | unsigned int mask; | 429 | int mask; |
430 | unsigned int prev; | 430 | unsigned int prev; |
431 | }; | 431 | }; |
432 | 432 | ||
@@ -705,7 +705,7 @@ static const struct option options[] = { | |||
705 | OPT_END() | 705 | OPT_END() |
706 | }; | 706 | }; |
707 | 707 | ||
708 | int cmd_top(int argc, const char **argv, const char *prefix) | 708 | int cmd_top(int argc, const char **argv, const char *prefix __used) |
709 | { | 709 | { |
710 | int counter; | 710 | int counter; |
711 | 711 | ||