summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-02-20 01:47:04 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-22 17:48:44 +0300
commit2c97b0d4a757eec7b83acfe3895d94ad4db13827 (patch)
tree8a7cb9064097244ed38afc657b11ff48b09583de /tools
parent91e48b7df15196b8ce01f40455219d3ed7889988 (diff)
downloadlinux-2c97b0d4a757eec7b83acfe3895d94ad4db13827.tar.xz
perf tools: Fix build on older systems
In RHEL 6.7: CC /tmp/build/perf/util/parse-events.o cc1: warnings being treated as errors util/parse-events.c: In function ‘parse_events_add_cache’: util/parse-events.c:366: error: declaration of ‘error’ shadows a global declaration util/util.h:136: error: shadowed declaration is here Rename it to 'err'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Fixes: 43d0b97817a4 ("perf tools: Enable config and setting names for legacy cache events") Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 2996aa4207bd..2b8770821365 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -363,7 +363,7 @@ static int config_attr(struct perf_event_attr *attr,
int parse_events_add_cache(struct list_head *list, int *idx,
char *type, char *op_result1, char *op_result2,
- struct parse_events_error *error,
+ struct parse_events_error *err,
struct list_head *head_config)
{
struct perf_event_attr attr;
@@ -425,7 +425,7 @@ int parse_events_add_cache(struct list_head *list, int *idx,
attr.type = PERF_TYPE_HW_CACHE;
if (head_config) {
- if (config_attr(&attr, head_config, error,
+ if (config_attr(&attr, head_config, err,
config_term_common))
return -EINVAL;