Remove %zx in printf (only GCC supports it, not MSVC).

llvm-svn: 203349
This commit is contained in:
Virgile Bello 2014-03-08 17:15:35 +00:00
parent da0fc76e7f
commit ffeba25652
3 changed files with 6 additions and 5 deletions

View File

@ -685,7 +685,7 @@ protected:
data_sp.reset (new DataBufferHeap (total_byte_size, '\0'));
if (data_sp->GetBytes() == NULL)
{
result.AppendErrorWithFormat ("can't allocate 0x%zx bytes for the memory read buffer, specify a smaller size to read", total_byte_size);
result.AppendErrorWithFormat ("can't allocate 0x%" PRIx32 " bytes for the memory read buffer, specify a smaller size to read", (uint32_t)total_byte_size);
result.SetStatus(eReturnStatusFailed);
return false;
}

View File

@ -852,7 +852,7 @@ ObjectFilePECOFF::DumpOptCOFFHeader(Stream *s, const coff_opt_header_t& header)
s->Printf (" heap_reserve_size = 0x%16.16" PRIx64 "\n", header.heap_reserve_size);
s->Printf (" heap_commit_size = 0x%16.16" PRIx64 "\n", header.heap_commit_size);
s->Printf (" loader_flags = 0x%8.8x\n", header.loader_flags);
s->Printf (" num_data_dir_entries = 0x%8.8zx\n", header.data_dirs.size());
s->Printf (" num_data_dir_entries = 0x%8.8x\n", (uint32_t)header.data_dirs.size());
uint32_t i;
for (i=0; i<header.data_dirs.size(); i++)
{

View File

@ -9,6 +9,7 @@
#include "lldb/Target/Memory.h"
// C Includes
#include <inttypes.h>
// C++ Includes
// Other libraries and framework includes
// Project includes
@ -395,8 +396,8 @@ AllocatedMemoryCache::AllocatePage (uint32_t byte_size,
Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
{
log->Printf ("Process::DoAllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16" PRIx64,
page_byte_size,
log->Printf ("Process::DoAllocateMemory (byte_size = 0x%8.8" PRIx32 ", permissions = %s) => 0x%16.16" PRIx64,
(uint32_t)page_byte_size,
GetPermissionsAsCString(permissions),
(uint64_t)addr);
}
@ -433,7 +434,7 @@ AllocatedMemoryCache::AllocateMemory (size_t byte_size,
}
Log *log (GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS));
if (log)
log->Printf ("AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8zx, permissions = %s) => 0x%16.16" PRIx64, byte_size, GetPermissionsAsCString(permissions), (uint64_t)addr);
log->Printf ("AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8" PRIx32 ", permissions = %s) => 0x%16.16" PRIx64, (uint32_t)byte_size, GetPermissionsAsCString(permissions), (uint64_t)addr);
return addr;
}