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-help.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-help.c')
-rw-r--r-- | tools/perf/builtin-help.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 0f32dc3f3c4c..2599d86a733b 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Builtin help command | 4 | * Builtin help command |
5 | */ | 5 | */ |
6 | #include "perf.h" | ||
6 | #include "util/cache.h" | 7 | #include "util/cache.h" |
7 | #include "builtin.h" | 8 | #include "builtin.h" |
8 | #include "util/exec_cmd.h" | 9 | #include "util/exec_cmd.h" |
@@ -277,7 +278,7 @@ static struct cmdnames main_cmds, other_cmds; | |||
277 | 278 | ||
278 | void list_common_cmds_help(void) | 279 | void list_common_cmds_help(void) |
279 | { | 280 | { |
280 | int i, longest = 0; | 281 | unsigned int i, longest = 0; |
281 | 282 | ||
282 | for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { | 283 | for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { |
283 | if (longest < strlen(common_cmds[i].name)) | 284 | if (longest < strlen(common_cmds[i].name)) |
@@ -415,9 +416,10 @@ static void show_html_page(const char *perf_cmd) | |||
415 | open_html(page_path.buf); | 416 | open_html(page_path.buf); |
416 | } | 417 | } |
417 | 418 | ||
418 | int cmd_help(int argc, const char **argv, const char *prefix) | 419 | int cmd_help(int argc, const char **argv, const char *prefix __used) |
419 | { | 420 | { |
420 | const char *alias; | 421 | const char *alias; |
422 | |||
421 | load_command_list("perf-", &main_cmds, &other_cmds); | 423 | load_command_list("perf-", &main_cmds, &other_cmds); |
422 | 424 | ||
423 | perf_config(perf_help_config, NULL); | 425 | perf_config(perf_help_config, NULL); |