summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Stream.cpp
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2012-11-29 21:49:15 +0000
committerDaniel Malea <daniel.malea@intel.com>2012-11-29 21:49:15 +0000
commitd01b2953fac73977de3bc97e72ea04ad1ec6600f (patch)
tree1883eeb5c13d5a2aa557d50eb40a0e08f43a8ec1 /lldb/source/Core/Stream.cpp
parent05d3bf77a1af49e8f6513729e4ccce780ffae4bb (diff)
downloadbcm5719-llvm-d01b2953fac73977de3bc97e72ea04ad1ec6600f.tar.gz
bcm5719-llvm-d01b2953fac73977de3bc97e72ea04ad1ec6600f.zip
Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types Patch from Matt Kopec! llvm-svn: 168945
Diffstat (limited to 'lldb/source/Core/Stream.cpp')
-rw-r--r--lldb/source/Core/Stream.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Core/Stream.cpp b/lldb/source/Core/Stream.cpp
index 6e5f99c1105..bb1af7b407c 100644
--- a/lldb/source/Core/Stream.cpp
+++ b/lldb/source/Core/Stream.cpp
@@ -14,6 +14,8 @@
#include <string.h>
#include <stdlib.h>
+#include <inttypes.h>
+
using namespace lldb;
using namespace lldb_private;
@@ -85,7 +87,7 @@ Stream::PutSLEB128 (int64_t sval)
}
else
{
- bytes_written = Printf ("0x%lli", sval);
+ bytes_written = Printf ("0x%" PRIi64, sval);
}
return bytes_written;
@@ -117,7 +119,7 @@ Stream::PutULEB128 (uint64_t uval)
}
else
{
- bytes_written = Printf ("0x%llx", uval);
+ bytes_written = Printf ("0x%" PRIx64, uval);
}
return bytes_written;
}
@@ -157,8 +159,8 @@ Stream::Address (uint64_t addr, int addr_size, const char *prefix, const char *s
if (suffix == NULL)
suffix = "";
// int addr_width = m_addr_size << 1;
-// Printf ("%s0x%0*llx%s", prefix, addr_width, addr, suffix);
- Printf ("%s0x%0*llx%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
+// Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_width, addr, suffix);
+ Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_size * 2, (uint64_t)addr, suffix);
}
//------------------------------------------------------------------
@@ -364,7 +366,7 @@ Stream::operator<< (int32_t sval)
Stream&
Stream::operator<< (int64_t sval)
{
- Printf ("%lli", sval);
+ Printf ("%" PRIi64, sval);
return *this;
}
OpenPOWER on IntegriCloud