[PATCH] D28991: [lld] Use %u instead of %d for uint32_t formatting
Hugh Bellamy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 12 20:59:28 PST 2017
hughbe updated this revision to Diff 88155.
https://reviews.llvm.org/D28991
Files:
lld/trunk/COFF/Writer.cpp
Index: lld/trunk/COFF/Writer.cpp
===================================================================
--- lld/trunk/COFF/Writer.cpp
+++ lld/trunk/COFF/Writer.cpp
@@ -205,7 +205,7 @@
*Hdr = Header;
if (StringTableOff) {
// If name is too long, write offset into the string table as a name.
- sprintf(Hdr->Name, "/%d", StringTableOff);
+ sprintf(Hdr->Name, "/%lu", static_cast<unsigned long>(StringTableOff));
} else {
assert(!Config->Debug || Name.size() <= COFF::NameSize);
strncpy(Hdr->Name, Name.data(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28991.88155.patch
Type: text/x-patch
Size: 535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170213/8c5440df/attachment.bin>
More information about the llvm-commits
mailing list