[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-8f28f19a87cb48d13570ba774a3e85776eb36bb4@git.kernel.org>
Date: Wed, 26 Sep 2012 21:23:18 -0700
From: tip-bot for Feng Tang <feng.tang@...el.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
mingo@...nel.org, a.p.zijlstra@...llo.nl, namhyung@...nel.org,
dsahern@...il.com, tglx@...utronix.de, feng.tang@...el.com,
mingo@...e.hu
Subject: [tip:perf/core] perf tools: Fix a compiling error in util/map.c
Commit-ID: 8f28f19a87cb48d13570ba774a3e85776eb36bb4
Gitweb: http://git.kernel.org/tip/8f28f19a87cb48d13570ba774a3e85776eb36bb4
Author: Feng Tang <feng.tang@...el.com>
AuthorDate: Mon, 27 Aug 2012 15:38:26 +0800
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 20 Sep 2012 08:36:34 -0300
perf tools: Fix a compiling error in util/map.c
This patch fix a compile warning taken as error:
CC util/map.o
cc1: warnings being treated as errors
util/map.c: In function ‘map__fprintf_dsoname’:
util/map.c:240: error: ‘dsoname’ may be used uninitialized in this function
make: *** [util/map.o] Error 1
Signed-off-by: Feng Tang <feng.tang@...el.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1346053107-11946-3-git-send-email-feng.tang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/map.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index b442ee4..ead5316 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -243,15 +243,14 @@ size_t map__fprintf(struct map *self, FILE *fp)
size_t map__fprintf_dsoname(struct map *map, FILE *fp)
{
- const char *dsoname;
+ const char *dsoname = "[unknown]";
if (map && map->dso && (map->dso->name || map->dso->long_name)) {
if (symbol_conf.show_kernel_path && map->dso->long_name)
dsoname = map->dso->long_name;
else if (map->dso->name)
dsoname = map->dso->name;
- } else
- dsoname = "[unknown]";
+ }
return fprintf(fp, "%s", dsoname);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists