diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-05 23:39:24 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-05 23:39:24 +0000 |
commit | dd17b25611018fa576a7b941d5c1d54ac489c13c (patch) | |
tree | 4f1d329ffbf4975290921f83e2213c7e733c9714 /lib/System/Unix | |
parent | 3b954815e1e592842d17119bada7e2f0c64bfee3 (diff) |
Don't use plain %x to print pointer values. I had changed it from %p
since %p isn't formatted consistently, but obviously plain %x is wrong.
PRIxPTR with a cast to uintptr_t would work here, but that requires
inconvenient build-system changes. %lu works on all current and
foreseable future hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60616 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/Signals.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc index abb6a33637..9c1050cf8a 100644 --- a/lib/System/Unix/Signals.inc +++ b/lib/System/Unix/Signals.inc @@ -97,7 +97,8 @@ static void PrintStackTrace() { if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname); else fprintf(stderr, " %-*s", width, name+1); - fprintf(stderr, " %#0*x", (int)(sizeof(void*) * 2) + 2, StackTrace[i]); + fprintf(stderr, " %#0*lx", + (int)(sizeof(void*) * 2) + 2, (unsigned long)StackTrace[i]); if (dlinfo.dli_sname != NULL) { int res; |