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/util/help.h | |
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/util/help.h')
-rw-r--r-- | tools/perf/util/help.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/help.h b/tools/perf/util/help.h index 56bc15406ffc..7128783637b4 100644 --- a/tools/perf/util/help.h +++ b/tools/perf/util/help.h | |||
@@ -2,8 +2,8 @@ | |||
2 | #define HELP_H | 2 | #define HELP_H |
3 | 3 | ||
4 | struct cmdnames { | 4 | struct cmdnames { |
5 | int alloc; | 5 | size_t alloc; |
6 | int cnt; | 6 | size_t cnt; |
7 | struct cmdname { | 7 | struct cmdname { |
8 | size_t len; /* also used for similarity index in help.c */ | 8 | size_t len; /* also used for similarity index in help.c */ |
9 | char name[FLEX_ARRAY]; | 9 | char name[FLEX_ARRAY]; |
@@ -19,7 +19,7 @@ static inline void mput_char(char c, unsigned int num) | |||
19 | void load_command_list(const char *prefix, | 19 | void load_command_list(const char *prefix, |
20 | struct cmdnames *main_cmds, | 20 | struct cmdnames *main_cmds, |
21 | struct cmdnames *other_cmds); | 21 | struct cmdnames *other_cmds); |
22 | void add_cmdname(struct cmdnames *cmds, const char *name, int len); | 22 | void add_cmdname(struct cmdnames *cmds, const char *name, size_t len); |
23 | /* Here we require that excludes is a sorted list. */ | 23 | /* Here we require that excludes is a sorted list. */ |
24 | void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes); | 24 | void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes); |
25 | int is_in_cmdlist(struct cmdnames *c, const char *s); | 25 | int is_in_cmdlist(struct cmdnames *c, const char *s); |