From: tip-bot for Feng Tang <feng.tang@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@kernel.org, a.p.zijlstra@chello.nl, namhyung@kernel.org,
dsahern@gmail.com, tglx@linutronix.de, feng.tang@intel.com,
mingo@elte.hu
Subject: [tip:perf/core] perf tools: Fix a compiling error in util/map.c
Date: Wed, 26 Sep 2012 21:23:18 -0700 [thread overview]
Message-ID: <tip-8f28f19a87cb48d13570ba774a3e85776eb36bb4@git.kernel.org> (raw)
In-Reply-To: <1346053107-11946-3-git-send-email-feng.tang@intel.com>
Commit-ID: 8f28f19a87cb48d13570ba774a3e85776eb36bb4
Gitweb: http://git.kernel.org/tip/8f28f19a87cb48d13570ba774a3e85776eb36bb4
Author: Feng Tang <feng.tang@intel.com>
AuthorDate: Mon, 27 Aug 2012 15:38:26 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.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@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.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@redhat.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);
}
next prev parent reply other threads:[~2012-09-27 4:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 7:38 [PATCH 0/3] perf tools: Fixes for some compile errors Feng Tang
2012-08-27 7:38 ` [PATCH 1/3] perf tools: Fix a compiling error in trace-event-perl.c for 32 bits machine Feng Tang
2012-08-27 15:33 ` Arnaldo Carvalho de Melo
2012-08-28 2:17 ` [PATCH v2 " Feng Tang
2012-09-27 4:22 ` [tip:perf/core] " tip-bot for Feng Tang
2012-08-27 7:38 ` [PATCH 2/3] Perf tools: Fix a compiling error in util/map.c Feng Tang
2012-09-27 4:23 ` tip-bot for Feng Tang [this message]
2012-08-27 7:38 ` [PATCH 3/3] perf tools: Fix a misuse of for_each_set_bit() in session.c Feng Tang
2012-08-27 7:59 ` Namhyung Kim
2012-08-27 8:18 ` Feng Tang
2012-12-18 17:39 ` Akemi Yagi
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-8f28f19a87cb48d13570ba774a3e85776eb36bb4@git.kernel.org \
--to=feng.tang@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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