From: Wang Nan <wangnan0@huawei.com>
To: <a.p.zijlstra@chello.nl>, <paulus@samba.org>, <mingo@redhat.com>,
<acme@kernel.org>, <ak@linux.intel.com>, <namhyung@kernel.org>
Cc: <lizefan@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] perf: fix building warning on ARM 32.
Date: Tue, 16 Dec 2014 10:10:10 +0800 [thread overview]
Message-ID: <1418695810-74455-1-git-send-email-wangnan0@huawei.com> (raw)
Commit 85c116a6c introduces asprintf() call and matches '%ld' to a u64
argument, which is incorrect on ARM.
CC /home/wn/util/srcline.o
util/srcline.c: In function 'get_srcline':
util/srcline.c:297:6: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u64' [-Werror=format]
cc1: all warnings being treated as errors
make[1]: *** [/home/wn/util/srcline.o] Error 1
Signed-off-by: Wang Nan <wangnan0@huawei.com>
---
tools/perf/util/srcline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index e73b6a5..42cb642 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -294,7 +294,7 @@ out:
}
if (sym) {
if (asprintf(&srcline, "%s+%ld", show_sym ? sym->name : "",
- addr - sym->start) < 0)
+ (long int)(addr - sym->start)) < 0)
return SRCLINE_UNKNOWN;
} else if (asprintf(&srcline, "%s[%lx]", dso->short_name, addr) < 0)
return SRCLINE_UNKNOWN;
--
1.8.4
next reply other threads:[~2014-12-16 2:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 2:10 Wang Nan [this message]
2014-12-16 4:49 ` Namhyung Kim
2014-12-16 5:47 ` Wang Nan
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=1418695810-74455-1-git-send-email-wangnan0@huawei.com \
--to=wangnan0@huawei.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®