public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf config: Fix build with older toolchain.
@ 2016-04-04 22:07 Vinson Lee
  2016-04-05  5:24 ` Taeung Song
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vinson Lee @ 2016-04-04 22:07 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Taeung Song, Jiri Olsa, Josh Poimboeuf,
	Alexei Starovoitov, Wang Nan
  Cc: linux-kernel

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]

Fixes: 9cb5987c8227 ("perf config: Rework buildid_dir_command_config to perf_buildid_config")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 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 5c20d783423b..a3d80a05e7a2 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 *v = perf_config_dirname(var, value);
 
-		if (!dirname)
+		if (!v)
 			return -1;
-		strncpy(buildid_dir, dirname, MAXPATHLEN-1);
+		strncpy(buildid_dir, v, MAXPATHLEN-1);
 		buildid_dir[MAXPATHLEN-1] = '\0';
 	}
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-13  7:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:perf/core] " tip-bot for Vinson Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox