public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Vinson Lee <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, jolsa@kernel.org,
	hpa@zytor.com, treeze.taeung@gmail.com, mingo@kernel.org,
	jpoimboe@redhat.com, ast@plumgrid.com, peterz@infradead.org,
	alexander.shishkin@linux.intel.com, wangnan0@huawei.com,
	vlee@freedesktop.org, tglx@linutronix.de
Subject: [tip:perf/core] perf config: Fix build with older toolchain.
Date: Wed, 13 Apr 2016 00:12:57 -0700	[thread overview]
Message-ID: <tip-d8e28654f28de74951ab1b7e59d2bebb442972aa@git.kernel.org> (raw)
In-Reply-To: <1459807659-9020-1-git-send-email-vlee@freedesktop.org>

Commit-ID:  d8e28654f28de74951ab1b7e59d2bebb442972aa
Gitweb:     http://git.kernel.org/tip/d8e28654f28de74951ab1b7e59d2bebb442972aa
Author:     Vinson Lee <vlee@freedesktop.org>
AuthorDate: Mon, 4 Apr 2016 22:07:39 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 6 Apr 2016 10:44:28 -0300

perf config: Fix build with older toolchain.

Fix build error on Ubuntu 12.04.5 with GCC 4.6.3.

    CC       util/config.o
  util/config.c: In function ‘perf_buildid_config’:
  util/config.c:384:15: error: declaration of ‘dirname’ shadows a global declaration [-Werror=shadow]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Taeung Song <treeze.taeung@gmail.com>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 9cb5987c8227 ("perf config: Rework buildid_dir_command_config to perf_buildid_config")
Link: http://lkml.kernel.org/r/1459807659-9020-1-git-send-email-vlee@freedesktop.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/config.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 5c20d78..664490b 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -381,11 +381,11 @@ static int perf_buildid_config(const char *var, const char *value)
 {
 	/* same dir for all commands */
 	if (!strcmp(var, "buildid.dir")) {
-		const char *dirname = perf_config_dirname(var, value);
+		const char *dir = perf_config_dirname(var, value);
 
-		if (!dirname)
+		if (!dir)
 			return -1;
-		strncpy(buildid_dir, dirname, MAXPATHLEN-1);
+		strncpy(buildid_dir, dir, MAXPATHLEN-1);
 		buildid_dir[MAXPATHLEN-1] = '\0';
 	}
 

      parent reply	other threads:[~2016-04-13  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 22:07 [PATCH] perf config: Fix build with older toolchain Vinson Lee
2016-04-05  5:24 ` Taeung Song
2016-04-05 13:38   ` Arnaldo Carvalho de Melo
2016-04-05 13:47     ` Taeung Song
2016-04-05 13:36 ` Arnaldo Carvalho de Melo
2016-04-13  7:12 ` tip-bot for Vinson Lee [this message]

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=tip-d8e28654f28de74951ab1b7e59d2bebb442972aa@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ast@plumgrid.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=treeze.taeung@gmail.com \
    --cc=vlee@freedesktop.org \
    --cc=wangnan0@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox