From 129b839d711ebbcd38fb11dcf5e299952a4a0ce2 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 8 Apr 2015 20:23:52 +0000 Subject: [PATCH] Fix -Wformat-pedantic warnings llvm-svn: 234429 --- lldb/source/Core/DataBufferMemoryMap.cpp | 9 ++++++--- lldb/source/Expression/IRExecutionUnit.cpp | 4 ++-- lldb/source/Expression/IRForTarget.cpp | 2 +- lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp | 5 ++--- lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp | 2 +- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lldb/source/Core/DataBufferMemoryMap.cpp b/lldb/source/Core/DataBufferMemoryMap.cpp index 26bad43a5f33..b26c48b1e2d0 100644 --- a/lldb/source/Core/DataBufferMemoryMap.cpp +++ b/lldb/source/Core/DataBufferMemoryMap.cpp @@ -90,7 +90,8 @@ DataBufferMemoryMap::Clear() { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_MMAP)); if (log) - log->Printf("DataBufferMemoryMap::Clear() m_mmap_addr = %p, m_mmap_size = %" PRIu64 "", m_mmap_addr, (uint64_t)m_mmap_size); + log->Printf("DataBufferMemoryMap::Clear() m_mmap_addr = %p, m_mmap_size = %" PRIu64 "", (void *)m_mmap_addr, + (uint64_t)m_mmap_size); #ifdef _WIN32 UnmapViewOfFile(m_mmap_addr); #else @@ -306,8 +307,10 @@ DataBufferMemoryMap::MemoryMapFromFileDescriptor (int fd, if (log) { - log->Printf("DataBufferMemoryMap::MemoryMapFromFileSpec() m_mmap_addr = %p, m_mmap_size = %" PRIu64 ", error = %s", - m_mmap_addr, (uint64_t)m_mmap_size, error.AsCString()); + log->Printf( + "DataBufferMemoryMap::MemoryMapFromFileSpec() m_mmap_addr = %p, m_mmap_size = %" PRIu64 + ", error = %s", + (void *)m_mmap_addr, (uint64_t)m_mmap_size, error.AsCString()); } } } diff --git a/lldb/source/Expression/IRExecutionUnit.cpp b/lldb/source/Expression/IRExecutionUnit.cpp index 077dd1ca2999..6598c74ddec2 100644 --- a/lldb/source/Expression/IRExecutionUnit.cpp +++ b/lldb/source/Expression/IRExecutionUnit.cpp @@ -588,7 +588,7 @@ IRExecutionUnit::MemoryManager::allocateCodeSection(uintptr_t Size, if (log) { log->Printf("IRExecutionUnit::allocateCodeSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p", - (uint64_t)Size, Alignment, SectionID, return_value); + (uint64_t)Size, Alignment, SectionID, (void *)return_value); } return return_value; @@ -615,7 +615,7 @@ IRExecutionUnit::MemoryManager::allocateDataSection(uintptr_t Size, if (log) { log->Printf("IRExecutionUnit::allocateDataSection(Size=0x%" PRIx64 ", Alignment=%u, SectionID=%u) = %p", - (uint64_t)Size, Alignment, SectionID, return_value); + (uint64_t)Size, Alignment, SectionID, (void *)return_value); } return return_value; diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index 842272602692..f5cfb782c483 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -1357,7 +1357,7 @@ IRForTarget::MaterializeInitializer (uint8_t *data, Constant *initializer) lldb_private::Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS)); if (log && log->GetVerbose()) - log->Printf(" MaterializeInitializer(%p, %s)", data, PrintValue(initializer).c_str()); + log->Printf(" MaterializeInitializer(%p, %s)", (void *)data, PrintValue(initializer).c_str()); Type *initializer_type = initializer->getType(); diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp index 257996a74b4d..34467033fe04 100644 --- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp +++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp @@ -776,9 +776,8 @@ PlatformPOSIX::Attach (ProcessAttachInfo &attach_info, if (log) { ModuleSP exe_module_sp = target->GetExecutableModule (); - log->Printf ("PlatformPOSIX::%s set selected target to %p %s", __FUNCTION__, - target, - exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str () : "" ); + log->Printf("PlatformPOSIX::%s set selected target to %p %s", __FUNCTION__, (void *)target, + exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str() : ""); } diff --git a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp index e4626900d816..a03e6578bbb7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/NameToDIE.cpp @@ -69,7 +69,7 @@ NameToDIE::Dump (Stream *s) for (uint32_t i=0; iPrintf("%p: {0x%8.8x} \"%s\"\n", cstr, m_map.GetValueAtIndexUnchecked(i), cstr); + s->Printf("%p: {0x%8.8x} \"%s\"\n", (void *)cstr, m_map.GetValueAtIndexUnchecked(i), cstr); } } -- 2.34.1