diff options
author | Ian Rogers <irogers@google.com> | 2021-09-15 14:14:28 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-09-15 18:21:00 -0300 |
commit | 8228e9361e2a7447eaed87499123e85871c8bc18 (patch) | |
tree | add8226113e31cc4c59e0a1d5d8de0e3535c4d12 /tools/perf/util/parse-events.c | |
parent | 00e0ca3721cf2ddcb38cf676a3de61933640d31d (diff) |
perf parse-events: Avoid enum forward declaration.
Enum forward declarations aren't allowed as the size can't be implied.
Switch to just using an int. This fixes a clang warning:
In file included from tools/perf/bench/evlist-open-close.c:13:
tools/perf/bench/../util/parse-events.h:185:6: error: redeclaration of already-defined enum 'perf_tool_event' is a GNU extension [-Werror,-Wgnu-redeclared-enum]
enum perf_tool_event;
^
tools/perf/bench/../util/evsel.h:28:6: note: previous definition is here
enum perf_tool_event {
^
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20210915211428.1773567-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-events.c')
-rw-r--r-- | tools/perf/util/parse-events.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 51a2219df601..5d1346aa0627 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -1471,7 +1471,7 @@ out_free_terms: int parse_events_add_tool(struct parse_events_state *parse_state, struct list_head *list, - enum perf_tool_event tool_event) + int tool_event) { return add_event_tool(list, &parse_state->idx, tool_event); } |