summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-04-04 04:06:10 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-04-04 04:06:10 +0000
commit324a1036194f95385b26c941bc82cc6dadf50ac7 (patch)
tree06bb7d9660aafa1ff4e69cfa813b5c122038e09f /lldb/source/Plugins/ObjectFile
parentf3aefca7c1bcdd3a6445b7ae04a9f69af567a7e7 (diff)
downloadbcm5719-llvm-324a1036194f95385b26c941bc82cc6dadf50ac7.tar.gz
bcm5719-llvm-324a1036194f95385b26c941bc82cc6dadf50ac7.zip
sweep up -Wformat warnings from gcc
This is a purely mechanical change explicitly casting any parameters for printf style conversion. This cleans up the warnings emitted by gcc 4.8 on Linux. llvm-svn: 205607
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
-rw-r--r--lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp8
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp14
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp10
3 files changed, 18 insertions, 14 deletions
diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
index ec0f093e6ad..1ed77701770 100644
--- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
+++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
@@ -202,16 +202,16 @@ ObjectFileJIT::Dump (Stream *s)
if (module_sp)
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
- s->Printf("%p: ", this);
+ s->Printf("%p: ", static_cast<void*>(this));
s->Indent();
s->PutCString("ObjectFileJIT");
-
+
ArchSpec arch;
if (GetArchitecture(arch))
*s << ", arch = " << arch.GetArchitectureName();
-
+
s->EOL();
-
+
SectionList *sections = GetSectionList();
if (sections)
sections->Dump(s, NULL, true, UINT32_MAX);
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 72190742d0b..ed80c635c74 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1632,7 +1632,10 @@ struct TrieEntry
void
Dump () const
{
- printf ("0x%16.16llx 0x%16.16llx 0x%16.16llx \"%s\"", address, flags, other, name.GetCString());
+ printf ("0x%16.16llx 0x%16.16llx 0x%16.16llx \"%s\"",
+ static_cast<unsigned long long>(address),
+ static_cast<unsigned long long>(flags),
+ static_cast<unsigned long long>(other), name.GetCString());
if (import_name)
printf (" -> \"%s\"\n", import_name.GetCString());
else
@@ -1649,17 +1652,18 @@ struct TrieEntryWithOffset
{
lldb::offset_t nodeOffset;
TrieEntry entry;
-
+
TrieEntryWithOffset (lldb::offset_t offset) :
nodeOffset (offset),
entry()
{
}
-
+
void
Dump (uint32_t idx) const
{
- printf ("[%3u] 0x%16.16llx: ", idx, nodeOffset);
+ printf ("[%3u] 0x%16.16llx: ", idx,
+ static_cast<unsigned long long>(nodeOffset));
entry.Dump();
}
@@ -4081,7 +4085,7 @@ ObjectFileMachO::Dump (Stream *s)
if (module_sp)
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
- s->Printf("%p: ", this);
+ s->Printf("%p: ", static_cast<void*>(this));
s->Indent();
if (m_header.magic == MH_MAGIC_64 || m_header.magic == MH_CIGAM_64)
s->PutCString("ObjectFileMachO64");
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 91c3f50bc6a..ca70b96651a 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -790,19 +790,19 @@ ObjectFilePECOFF::Dump(Stream *s)
if (module_sp)
{
lldb_private::Mutex::Locker locker(module_sp->GetMutex());
- s->Printf("%p: ", this);
+ s->Printf("%p: ", static_cast<void*>(this));
s->Indent();
s->PutCString("ObjectFilePECOFF");
-
+
ArchSpec header_arch;
GetArchitecture (header_arch);
-
+
*s << ", file = '" << m_file << "', arch = " << header_arch.GetArchitectureName() << "\n";
-
+
SectionList *sections = GetSectionList();
if (sections)
sections->Dump(s, NULL, true, UINT32_MAX);
-
+
if (m_symtab_ap.get())
m_symtab_ap->Dump(s, NULL, eSortOrderNone);
OpenPOWER on IntegriCloud