From 324a1036194f95385b26c941bc82cc6dadf50ac7 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 4 Apr 2014 04:06:10 +0000 Subject: 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 --- .../Plugins/Process/Utility/DynamicRegisterInfo.cpp | 8 +++++--- lldb/source/Plugins/Process/Utility/HistoryThread.cpp | 6 ++++-- .../Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 18 +++++++----------- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lldb/source/Plugins/Process') diff --git a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp index 744d7ada9c8..35e82925f42 100644 --- a/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp +++ b/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp @@ -632,7 +632,8 @@ DynamicRegisterInfo::Dump () const { StreamFile s(stdout, false); const size_t num_regs = m_regs.size(); - s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " registers:\n", this, (uint64_t)num_regs); + s.Printf("%p: DynamicRegisterInfo contains %" PRIu64 " registers:\n", + static_cast(this), static_cast(num_regs)); for (size_t i=0; i(this), static_cast(num_sets)); for (size_t i=0; iPrintf ("%p HistoryThread::HistoryThread", this); + log->Printf ("%p HistoryThread::HistoryThread", + static_cast(this)); } // Destructor @@ -51,7 +52,8 @@ HistoryThread::~HistoryThread () { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_OBJECT)); if (log) - log->Printf ("%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")", this, GetID()); + log->Printf ("%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")", + static_cast(this), GetID()); DestroyThread(); } diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 393def34975..a3cd6e9351e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -1458,8 +1458,7 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new if (log && log->GetMask().Test(GDBR_LOG_VERBOSE)) log->Printf( "ProcessGDBRemote::%s Making new thread: %p for thread ID: 0x%" PRIx64 ".\n", - __FUNCTION__, - thread_sp.get(), + __FUNCTION__, static_cast(thread_sp.get()), thread_sp->GetID()); } else @@ -1467,8 +1466,7 @@ ProcessGDBRemote::UpdateThreadList (ThreadList &old_thread_list, ThreadList &new if (log && log->GetMask().Test(GDBR_LOG_VERBOSE)) log->Printf( "ProcessGDBRemote::%s Found old thread: %p for thread ID: 0x%" PRIx64 ".\n", - __FUNCTION__, - thread_sp.get(), + __FUNCTION__, static_cast(thread_sp.get()), thread_sp->GetID()); } new_thread_list.AddThread(thread_sp); @@ -1563,9 +1561,9 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) if (log && log->GetMask().Test(GDBR_LOG_VERBOSE)) log->Printf ("ProcessGDBRemote::%s Adding new thread: %p for thread ID: 0x%" PRIx64 ".\n", __FUNCTION__, - thread_sp.get(), + static_cast(thread_sp.get()), thread_sp->GetID()); - + m_thread_list_real.AddThread(thread_sp); } gdb_thread = static_cast (thread_sp.get()); @@ -1588,7 +1586,6 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) if (tid != LLDB_INVALID_THREAD_ID) m_thread_ids.push_back (tid); value.erase(0, comma_pos + 1); - } tid = Args::StringToUInt64 (value.c_str(), LLDB_INVALID_THREAD_ID, 16); if (tid != LLDB_INVALID_THREAD_ID) @@ -1715,7 +1712,6 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) thread_sp->SetStopInfo (invalid_stop_info_sp); } } - } else if (reason.compare("trap") == 0) { @@ -1740,7 +1736,7 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) handled = true; } } - + if (!handled && signo && did_exec == false) { if (signo == SIGTRAP) @@ -1750,7 +1746,7 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) handled = true; addr_t pc = thread_sp->GetRegisterContext()->GetPC() + m_breakpoint_pc_offset; lldb::BreakpointSiteSP bp_site_sp = thread_sp->GetProcess()->GetBreakpointSiteList().FindByAddress(pc); - + if (bp_site_sp) { // If the breakpoint is for this thread, then we'll report the hit, but if it is for another thread, @@ -1782,7 +1778,7 @@ ProcessGDBRemote::SetThreadStopInfo (StringExtractor& stop_packet) if (!handled) thread_sp->SetStopInfo (StopInfo::CreateStopReasonWithSignal (*thread_sp, signo)); } - + if (!description.empty()) { lldb::StopInfoSP stop_info_sp (thread_sp->GetStopInfo ()); -- cgit v1.2.3