mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix gcc/printf/ISO C++ warning
Remove the use of the 't' length modifier to avoid a gcc warning. Based on usage, 32 bits of precision is good enough for printing a stack offset for a stack trace. 't' length modifier isn't in C++03 but it *is* in C++11. Added a FIXME to reintroduce once LLVM makes the switch to C++11. Reviewer: gribozavr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ff776bfde
commit
3c1c042a64
@ -295,7 +295,11 @@ void llvm::sys::PrintStackTrace(FILE *FD) {
|
|||||||
else fputs(d, FD);
|
else fputs(d, FD);
|
||||||
free(d);
|
free(d);
|
||||||
|
|
||||||
fprintf(FD, " + %tu",(char*)StackTrace[i]-(char*)dlinfo.dli_saddr);
|
// FIXME: When we move to C++11, use %t length modifier. It's not in
|
||||||
|
// C++03 and causes gcc to issue warnings. Losing the upper 32 bits of
|
||||||
|
// the stack offset for a stack dump isn't likely to cause any problems.
|
||||||
|
fprintf(FD, " + %u",(unsigned)((char*)StackTrace[i]-
|
||||||
|
(char*)dlinfo.dli_saddr));
|
||||||
}
|
}
|
||||||
fputc('\n', FD);
|
fputc('\n', FD);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user