[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 Jan 22 11:45:47 PST 2017


hughbe updated this revision to Diff 85295.

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, "/%u", StringTableOff);
   } else {
     assert(!Config->Debug || Name.size() <= COFF::NameSize);
     strncpy(Hdr->Name, Name.data(),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28991.85295.patch
Type: text/x-patch
Size: 506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170122/3e5f0ff9/attachment.bin>


More information about the llvm-commits mailing list