Fix a warning that is emitted on the suns
authorChris Lattner <sabre@nondot.org>
Mon, 11 Oct 2004 15:50:40 +0000 (15:50 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 11 Oct 2004 15:50:40 +0000 (15:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16917 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
lib/Target/CBackend/Writer.cpp

index bdc8b8d650031c4891c292ee3f971b43a8323073..c4d8c46483702df7e6714d4635187a82b062181a 100644 (file)
@@ -573,7 +573,7 @@ void CWriter::printConstant(Constant *CPV) {
         char Buffer[100];
 
         DHex.d = FPC->getValue();
-        sprintf(Buffer, "0x%llx", DHex.ll);
+        sprintf(Buffer, "0x%llx", (unsigned long long)DHex.ll);
 
         std::string Num(&Buffer[0], &Buffer[6]);
         unsigned long Val = strtoul(Num.c_str(), 0, 16);
index bdc8b8d650031c4891c292ee3f971b43a8323073..c4d8c46483702df7e6714d4635187a82b062181a 100644 (file)
@@ -573,7 +573,7 @@ void CWriter::printConstant(Constant *CPV) {
         char Buffer[100];
 
         DHex.d = FPC->getValue();
-        sprintf(Buffer, "0x%llx", DHex.ll);
+        sprintf(Buffer, "0x%llx", (unsigned long long)DHex.ll);
 
         std::string Num(&Buffer[0], &Buffer[6]);
         unsigned long Val = strtoul(Num.c_str(), 0, 16);