From: David Ahern <dsahern@gmail.com>
To: Jiri Olsa <jolsa@redhat.com>, linux-kernel@vger.kernel.org
Cc: Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH] perf tools: Fix pmu object compilation error
Date: Wed, 16 Apr 2014 13:02:16 -0600 [thread overview]
Message-ID: <534ED3B8.8050806@gmail.com> (raw)
In-Reply-To: <1397674818-27054-1-git-send-email-jolsa@redhat.com>
On 4/16/14, 1:00 PM, Jiri Olsa wrote:
> After applying some patches got another shadowing error:
>
> CC util/pmu.o
> util/pmu.c: In function ‘pmu_alias_terms’:
> util/pmu.c:287:35: error: declaration of ‘clone’ shadows a global declaration [-Werror=shadow]
>
> Renaming clone to cloned.
>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> ---
> tools/perf/util/pmu.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 00a7dcb..7a811eb 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -284,17 +284,17 @@ static int pmu_aliases(const char *name, struct list_head *head)
> static int pmu_alias_terms(struct perf_pmu_alias *alias,
> struct list_head *terms)
> {
> - struct parse_events_term *term, *clone;
> + struct parse_events_term *term, *cloned;
> LIST_HEAD(list);
> int ret;
>
> list_for_each_entry(term, &alias->terms, list) {
> - ret = parse_events_term__clone(&clone, term);
> + ret = parse_events_term__clone(&cloned, term);
> if (ret) {
> parse_events__free_terms(&list);
> return ret;
> }
> - list_add_tail(&clone->list, &list);
> + list_add_tail(&cloned->list, &list);
> }
> list_splice(&list, terms);
> return 0;
>
Acked-by: David Ahern <dsahern@gmail.com>
next prev parent reply other threads:[~2014-04-16 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-16 19:00 [PATCH] perf tools: Fix pmu object compilation error Jiri Olsa
2014-04-16 19:02 ` David Ahern [this message]
2014-04-22 18:33 ` [tip:perf/core] " tip-bot for Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=534ED3B8.8050806@gmail.com \
--to=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.