[Lldb-commits] [lldb] r297228 - fix format specifier warnings

Tim Hammerquist via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 7 13:26:04 PST 2017


Author: penryu
Date: Tue Mar  7 15:26:04 2017
New Revision: 297228

URL: http://llvm.org/viewvc/llvm-project?rev=297228&view=rev
Log:
fix format specifier warnings

Modified:
    lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
    lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
    lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp

Modified: lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp?rev=297228&r1=297227&r2=297228&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp Tue Mar  7 15:26:04 2017
@@ -692,7 +692,7 @@ void DarwinLogCollector::CancelActivityS
 
   DNBLogThreadedIf(LOG_DARWIN_LOG, "DarwinLogCollector::%s(): canceling "
                                    "activity stream %p",
-                   __FUNCTION__, m_activity_stream);
+                   __FUNCTION__, reinterpret_cast<void *>(m_activity_stream));
   (*s_os_activity_stream_cancel)(m_activity_stream);
   m_activity_stream = nullptr;
 }

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm?rev=297228&r1=297227&r2=297228&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachProcess.mm Tue Mar  7 15:26:04 2017
@@ -1269,7 +1269,7 @@ bool MachProcess::Interrupt() {
 bool MachProcess::Signal(int signal, const struct timespec *timeout_abstime) {
   DNBLogThreadedIf(LOG_PROCESS,
                    "MachProcess::Signal (signal = %d, timeout = %p)", signal,
-                   timeout_abstime);
+                   reinterpret_cast<const void *>(timeout_abstime));
   nub_state_t state = GetState();
   if (::kill(ProcessID(), signal) == 0) {
     // If we were running and we have a timeout, wait for the signal to stop
@@ -1277,20 +1277,21 @@ bool MachProcess::Signal(int signal, con
       DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Signal (signal = %d, timeout "
                                     "= %p) waiting for signal to stop "
                                     "process...",
-                       signal, timeout_abstime);
+                       signal, reinterpret_cast<const void *>(timeout_abstime));
       m_private_events.WaitForSetEvents(eEventProcessStoppedStateChanged,
                                         timeout_abstime);
       state = GetState();
       DNBLogThreadedIf(
           LOG_PROCESS,
           "MachProcess::Signal (signal = %d, timeout = %p) state = %s", signal,
-          timeout_abstime, DNBStateAsString(state));
+          reinterpret_cast<const void *>(timeout_abstime),
+          DNBStateAsString(state));
       return !IsRunning(state);
     }
     DNBLogThreadedIf(
         LOG_PROCESS,
         "MachProcess::Signal (signal = %d, timeout = %p) not waiting...",
-        signal, timeout_abstime);
+        signal, reinterpret_cast<const void *>(timeout_abstime));
     return true;
   }
   DNBError err(errno, DNBError::POSIX);
@@ -1596,7 +1597,8 @@ DNBBreakpoint *MachProcess::CreateBreakp
   if (EnableBreakpoint(addr)) {
     DNBLogThreadedIf(LOG_BREAKPOINTS, "MachProcess::CreateBreakpoint ( addr = "
                                       "0x%8.8llx, length = %llu) => %p",
-                     (uint64_t)addr, (uint64_t)length, bp);
+                     (uint64_t)addr, (uint64_t)length,
+                     reinterpret_cast<void *>(bp));
     return bp;
   } else if (bp->Release() == 0) {
     m_breakpoints.Remove(addr);
@@ -1627,7 +1629,8 @@ DNBBreakpoint *MachProcess::CreateWatchp
   if (EnableWatchpoint(addr)) {
     DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
                                       "0x%8.8llx, length = %llu) => %p",
-                     (uint64_t)addr, (uint64_t)length, wp);
+                     (uint64_t)addr, (uint64_t)length,
+                     reinterpret_cast<void *>(wp));
     return wp;
   } else {
     DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
@@ -2156,7 +2159,7 @@ void MachProcess::AppendSTDOUT(char *s,
 
 size_t MachProcess::GetAvailableSTDOUT(char *buf, size_t buf_size) {
   DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
-                   buf, (uint64_t)buf_size);
+                   reinterpret_cast<void *>(buf), (uint64_t)buf_size);
   PTHREAD_MUTEX_LOCKER(locker, m_stdio_mutex);
   size_t bytes_available = m_stdout_data.size();
   if (bytes_available > 0) {
@@ -2316,7 +2319,7 @@ void MachProcess::SignalAsyncProfileData
 
 size_t MachProcess::GetAsyncProfileData(char *buf, size_t buf_size) {
   DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
-                   buf, (uint64_t)buf_size);
+                   reinterpret_cast<void *>(buf), (uint64_t)buf_size);
   PTHREAD_MUTEX_LOCKER(locker, m_profile_data_mutex);
   if (m_profile_data.empty())
     return 0;
@@ -2839,9 +2842,12 @@ pid_t MachProcess::LaunchForDebug(
   // Clear out and clean up from any current state
   Clear();
 
-  DNBLogThreadedIf(LOG_PROCESS, "%s( path = '%s', argv = %p, envp = %p, "
-                                "launch_flavor = %u, disable_aslr = %d )",
-                   __FUNCTION__, path, argv, envp, launch_flavor, disable_aslr);
+  DNBLogThreadedIf(LOG_PROCESS,
+                   "%s( path = '%s', argv = %p, envp = %p, "
+                   "launch_flavor = %u, disable_aslr = %d )",
+                   __FUNCTION__, path, reinterpret_cast<const void *>(argv),
+                   reinterpret_cast<const void *>(envp), launch_flavor,
+                   disable_aslr);
 
   // Fork a child process for debugging
   SetState(eStateLaunching);
@@ -2984,7 +2990,8 @@ pid_t MachProcess::PosixSpawnChildForPTr
   DNBLogThreadedIf(LOG_PROCESS, "%s ( path='%s', argv=%p, envp=%p, "
                                 "working_dir=%s, stdin=%s, stdout=%s "
                                 "stderr=%s, no-stdio=%i)",
-                   __FUNCTION__, path, argv, envp, working_directory,
+                   __FUNCTION__, path, reinterpret_cast<const void *>(argv),
+                   reinterpret_cast<const void *>(envp), working_directory,
                    stdin_path, stdout_path, stderr_path, no_stdio);
 
   err.SetError(::posix_spawnattr_init(&attr), DNBError::POSIX);

Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp?rev=297228&r1=297227&r2=297228&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachThread.cpp Tue Mar  7 15:26:04 2017
@@ -50,7 +50,7 @@ MachThread::MachThread(MachProcess *proc
   DNBLogThreadedIf(LOG_THREAD | LOG_VERBOSE,
                    "MachThread::MachThread ( process = %p, tid = 0x%8.8" PRIx64
                    ", seq_id = %u )",
-                   &m_process, m_unique_id, m_seq_id);
+                   reinterpret_cast<void *>(&m_process), m_unique_id, m_seq_id);
 }
 
 MachThread::~MachThread() {




More information about the lldb-commits mailing list