[Lldb-commits] [lldb] r193832 - Fix the format warnings.

Sylvestre Ledru sylvestre at debian.org
Thu Oct 31 16:55:19 PDT 2013


Author: sylvestre
Date: Thu Oct 31 18:55:19 2013
New Revision: 193832

URL: http://llvm.org/viewvc/llvm-project?rev=193832&view=rev
Log:
Fix the format warnings.
In almost all cases, the misuse is about "%lu" being used instead of the correct "%zu" (even though these are compatible on 64-bit platforms in practice). There are even a couple of cases where "%ld" (ie., signed int) is used instead of "%zu", and one where "%lu" is used instead of "%" PRIu64.

Fixes bug #17551.

Patch by "/dev/humancontroller"


Modified:
    lldb/trunk/source/API/SBData.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
    lldb/trunk/source/Commands/CommandObjectMemory.cpp
    lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
    lldb/trunk/source/Expression/ClangFunction.cpp
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Expression/IRForTarget.cpp
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
    lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/Symtab.cpp
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Thu Oct 31 18:55:19 2013
@@ -122,7 +122,7 @@ SBData::GetByteSize ()
         value = m_opaque_sp->GetByteSize();
     if (log)
         log->Printf ("SBData::GetByteSize () => "
-                     "(%lu)", value);
+                     "(%zu)", value);
     return value;
 }
 
@@ -479,7 +479,7 @@ SBData::ReadRawData (lldb::SBError& erro
             error.SetErrorString("unable to read data");
     }
     if (log)
-        log->Printf ("SBData::ReadRawData (error=%p,offset=%" PRIu64 ",buf=%p,size=%lu) => "
+        log->Printf ("SBData::ReadRawData (error=%p,offset=%" PRIu64 ",buf=%p,size=%zu) => "
                      "(%p)", error.get(), offset, buf, size, ok);
     return ok ? size : 0;
 }
@@ -497,7 +497,7 @@ SBData::SetData (lldb::SBError& error,
     else
         m_opaque_sp->SetData(buf, size, endian);
     if (log)
-        log->Printf ("SBData::SetData (error=%p,buf=%p,size=%lu,endian=%d,addr_size=%c) => "
+        log->Printf ("SBData::SetData (error=%p,buf=%p,size=%zu,endian=%d,addr_size=%c) => "
                      "(%p)", error.get(), buf, size, endian, addr_size, m_opaque_sp.get());
 }
 
@@ -647,7 +647,7 @@ SBData::SetDataFromUInt64Array (uint64_t
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %lu) => "
+            log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %zu) => "
                          "false", array, array_len);
         return false;
     }
@@ -662,7 +662,7 @@ SBData::SetDataFromUInt64Array (uint64_t
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %lu) => "
+        log->Printf ("SBData::SetDataFromUInt64Array (array=%p, array_len = %zu) => "
                      "true", array, array_len);
     
     return true;
@@ -676,7 +676,7 @@ SBData::SetDataFromUInt32Array (uint32_t
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %lu) => "
+            log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %zu) => "
                          "false", array, array_len);
         return false;
     }
@@ -691,7 +691,7 @@ SBData::SetDataFromUInt32Array (uint32_t
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %lu) => "
+        log->Printf ("SBData::SetDataFromUInt32Array (array=%p, array_len = %zu) => "
                      "true", array, array_len);
     
     return true;
@@ -705,7 +705,7 @@ SBData::SetDataFromSInt64Array (int64_t*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %lu) => "
+            log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %zu) => "
                          "false", array, array_len);
         return false;
     }
@@ -720,7 +720,7 @@ SBData::SetDataFromSInt64Array (int64_t*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %lu) => "
+        log->Printf ("SBData::SetDataFromSInt64Array (array=%p, array_len = %zu) => "
                      "true", array, array_len);
     
     return true;
@@ -734,7 +734,7 @@ SBData::SetDataFromSInt32Array (int32_t*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %lu) => "
+            log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %zu) => "
                          "false", array, array_len);
         return false;
     }
@@ -749,7 +749,7 @@ SBData::SetDataFromSInt32Array (int32_t*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %lu) => "
+        log->Printf ("SBData::SetDataFromSInt32Array (array=%p, array_len = %zu) => "
                      "true", array, array_len);
     
     return true;
@@ -763,7 +763,7 @@ SBData::SetDataFromDoubleArray (double*
     if (!array || array_len == 0)
     {
         if (log)
-            log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %lu) => "
+            log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %zu) => "
                          "false", array, array_len);
         return false;
     }
@@ -778,7 +778,7 @@ SBData::SetDataFromDoubleArray (double*
         m_opaque_sp->SetData(buffer_sp);
     
     if (log)
-        log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %lu) => "
+        log->Printf ("SBData::SetDataFromDoubleArray (array=%p, array_len = %zu) => "
                      "true", array, array_len);
     
     return true;

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Thu Oct 31 18:55:19 2013
@@ -337,7 +337,7 @@ SBProcess::PutSTDIN (const char *src, si
     }
     
     if (log)
-        log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %lu", 
+        log->Printf ("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%d) => %zu", 
                      process_sp.get(), 
                      src, 
                      (uint32_t) src_len, 

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Thu Oct 31 18:55:19 2013
@@ -1078,7 +1078,7 @@ protected:
         {
             // No breakpoint selected; enable all currently set breakpoints.
             target->EnableAllBreakpoints ();
-            result.AppendMessageWithFormat ("All breakpoints enabled. (%lu breakpoints)\n", num_breakpoints);
+            result.AppendMessageWithFormat ("All breakpoints enabled. (%zu breakpoints)\n", num_breakpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1197,7 +1197,7 @@ protected:
         {
             // No breakpoint selected; disable all currently set breakpoints.
             target->DisableAllBreakpoints ();
-            result.AppendMessageWithFormat ("All breakpoints disabled. (%lu breakpoints)\n", num_breakpoints);
+            result.AppendMessageWithFormat ("All breakpoints disabled. (%zu breakpoints)\n", num_breakpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1699,7 +1699,7 @@ protected:
             else
             {
                 target->RemoveAllBreakpoints ();
-                result.AppendMessageWithFormat ("All breakpoints removed. (%lu %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
+                result.AppendMessageWithFormat ("All breakpoints removed. (%zu %s)\n", num_breakpoints, num_breakpoints > 1 ? "breakpoints" : "breakpoint");
             }
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }

Modified: lldb/trunk/source/Commands/CommandObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectMemory.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectMemory.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectMemory.cpp Thu Oct 31 18:55:19 2013
@@ -651,7 +651,7 @@ protected:
             }
             else if (m_format_options.GetCountValue().OptionWasSet())
             {
-                result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %lu), not both.\n", end_addr, item_count);
+                result.AppendErrorWithFormat("specify either the end address (0x%" PRIx64 ") or the count (--count %zu), not both.\n", end_addr, item_count);
                 result.SetStatus(eReturnStatusFailed);
                 return false;
             }
@@ -708,7 +708,7 @@ protected:
             }
             
             if (bytes_read < total_byte_size)
-                result.AppendWarningWithFormat("Not all bytes (%lu/%lu) were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
+                result.AppendWarningWithFormat("Not all bytes (%zu/%zu) were able to be read from 0x%" PRIx64 ".\n", bytes_read, total_byte_size, addr);
         }
         else
         {
@@ -1232,7 +1232,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1260,7 +1260,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value 0x%" PRIx64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1300,7 +1300,7 @@ protected:
                 }
                 else if (!SIntValueIsValidForSize (sval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %lu byte signed integer value.\n", sval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIi64 " is too large or small to fit in a %zu byte signed integer value.\n", sval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1317,7 +1317,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIu64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }
@@ -1334,7 +1334,7 @@ protected:
                 }
                 else if (!UIntValueIsValidForSize (uval64, item_byte_size))
                 {
-                    result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %lu byte unsigned integer value.\n", uval64, item_byte_size);
+                    result.AppendErrorWithFormat ("Value %" PRIo64 " is too large to fit in a %zu byte unsigned integer value.\n", uval64, item_byte_size);
                     result.SetStatus(eReturnStatusFailed);
                     return false;
                 }

Modified: lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp Thu Oct 31 18:55:19 2013
@@ -397,7 +397,7 @@ protected:
         {
             // No watchpoint selected; enable all currently set watchpoints.
             target->EnableAllWatchpoints();
-            result.AppendMessageWithFormat("All watchpoints enabled. (%lu watchpoints)\n", num_watchpoints);
+            result.AppendMessageWithFormat("All watchpoints enabled. (%zu watchpoints)\n", num_watchpoints);
             result.SetStatus(eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -476,7 +476,7 @@ protected:
             // No watchpoint selected; disable all currently set watchpoints.
             if (target->DisableAllWatchpoints())
             {
-                result.AppendMessageWithFormat("All watchpoints disabled. (%lu watchpoints)\n", num_watchpoints);
+                result.AppendMessageWithFormat("All watchpoints disabled. (%zu watchpoints)\n", num_watchpoints);
                 result.SetStatus(eReturnStatusSuccessFinishNoResult);
             }
             else
@@ -564,7 +564,7 @@ protected:
             else
             {
                 target->RemoveAllWatchpoints();
-                result.AppendMessageWithFormat("All watchpoints removed. (%lu watchpoints)\n", num_watchpoints);
+                result.AppendMessageWithFormat("All watchpoints removed. (%zu watchpoints)\n", num_watchpoints);
             }
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
@@ -706,7 +706,7 @@ protected:
         if (command.GetArgumentCount() == 0)
         {
             target->IgnoreAllWatchpoints(m_options.m_ignore_count);
-            result.AppendMessageWithFormat("All watchpoints ignored. (%lu watchpoints)\n", num_watchpoints);
+            result.AppendMessageWithFormat("All watchpoints ignored. (%zu watchpoints)\n", num_watchpoints);
             result.SetStatus (eReturnStatusSuccessFinishNoResult);
         }
         else
@@ -1099,7 +1099,7 @@ protected:
         }
         else
         {
-            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu, variable expression='%s').\n",
+            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu, variable expression='%s').\n",
                                          addr, size, command.GetArgumentAtIndex(0));
             if (error.AsCString(NULL))
                 result.AppendError(error.AsCString());
@@ -1308,7 +1308,7 @@ protected:
         }
         else
         {
-            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%lu).\n",
+            result.AppendErrorWithFormat("Watchpoint creation failed (addr=0x%" PRIx64 ", size=%zu).\n",
                                          addr, size);
             if (error.AsCString(NULL))
                 result.AppendError(error.AsCString());

Modified: lldb/trunk/source/Expression/ClangFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangFunction.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangFunction.cpp (original)
+++ lldb/trunk/source/Expression/ClangFunction.cpp Thu Oct 31 18:55:19 2013
@@ -173,7 +173,7 @@ ClangFunction::CompileFunction (Stream &
             }
             else
             {   
-                errors.Printf("Could not determine type of input value %lu.", i);
+                errors.Printf("Could not determine type of input value %zu.", i);
                 return 1;
             }
         }
@@ -344,7 +344,7 @@ ClangFunction::WriteFunctionArguments (E
     size_t num_args = arg_values.GetSize();
     if (num_args != m_arg_values.GetSize())
     {
-        errors.Printf ("Wrong number of arguments - was: %lu should be: %lu", num_args, m_arg_values.GetSize());
+        errors.Printf ("Wrong number of arguments - was: %zu should be: %zu", num_args, m_arg_values.GetSize());
         return false;
     }
     

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Thu Oct 31 18:55:19 2013
@@ -1363,7 +1363,7 @@ DWARFExpression::Evaluate
         if (log && log->GetVerbose())
         {
             size_t count = stack.size();
-            log->Printf("Stack before operation has %lu values:", count);
+            log->Printf("Stack before operation has %zu values:", count);
             for (size_t i=0; i<count; ++i)
             {
                 StreamString new_value;
@@ -2739,7 +2739,7 @@ DWARFExpression::Evaluate
     else if (log && log->GetVerbose())
     {
         size_t count = stack.size();
-        log->Printf("Stack after operation has %lu values:", count);
+        log->Printf("Stack after operation has %zu values:", count);
         for (size_t i=0; i<count; ++i)
         {
             StreamString new_value;

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Thu Oct 31 18:55:19 2013
@@ -2028,7 +2028,7 @@ IRForTarget::ReplaceStaticLiterals (llvm
                 }
                 ss.flush();
                 
-                log->Printf("Found ConstantFP with size %lu and raw data %s", operand_data_size, s.c_str());
+                log->Printf("Found ConstantFP with size %zu and raw data %s", operand_data_size, s.c_str());
             }
             
             lldb_private::DataBufferHeap data(operand_data_size, 0);
@@ -2491,7 +2491,7 @@ IRForTarget::ReplaceVariables (Function
     }
     
     if (log)
-        log->Printf("Total structure [align %" PRId64 ", size %lu]", alignment, size);
+        log->Printf("Total structure [align %" PRId64 ", size %zu]", alignment, size);
     
     return true;
 }

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Thu Oct 31 18:55:19 2013
@@ -331,7 +331,7 @@ ScriptInterpreterPython::PythonInputRead
             if (script_interpreter->m_embedded_thread_pty.GetMasterFileDescriptor() != -1)
             {
                 if (log)
-                    log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, GotToken, bytes='%s', byte_len = %lu", bytes,
+                    log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, GotToken, bytes='%s', byte_len = %zu", bytes,
                                  bytes_len);
                 if (bytes && bytes_len)
                     ::write (script_interpreter->m_embedded_thread_pty.GetMasterFileDescriptor(), bytes, bytes_len);
@@ -340,7 +340,7 @@ ScriptInterpreterPython::PythonInputRead
             else
             {
                 if (log)
-                    log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, GotToken, bytes='%s', byte_len = %lu, Master File Descriptor is bad.", 
+                    log->Printf ("ScriptInterpreterPython::NonInteractiveInputReaderCallback, GotToken, bytes='%s', byte_len = %zu, Master File Descriptor is bad.", 
                                  bytes,
                                  bytes_len);
                 reader.SetIsDone (true);
@@ -867,7 +867,7 @@ ScriptInterpreterPython::InputReaderCall
         if (script_interpreter->m_embedded_python_pty.GetMasterFileDescriptor() != -1)
         {
             if (log)
-                log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %lu", bytes,
+                log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %zu", bytes,
                              bytes_len);
             if (bytes && bytes_len)
             {
@@ -881,7 +881,7 @@ ScriptInterpreterPython::InputReaderCall
         else
         {
             if (log)
-                log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %lu, Master File Descriptor is bad.", 
+                log->Printf ("ScriptInterpreterPython::InputReaderCallback, GotToken, bytes='%s', byte_len = %zu, Master File Descriptor is bad.", 
                              bytes,
                              bytes_len);
             reader.SetIsDone (true);

Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Thu Oct 31 18:55:19 2013
@@ -461,7 +461,7 @@ ObjectContainerBSDArchive::Dump (Stream
     s->Indent();
     const size_t num_archs = GetNumArchitectures();
     const size_t num_objects = GetNumObjects();
-    s->Printf("ObjectContainerBSDArchive, num_archs = %lu, num_objects = %lu", num_archs, num_objects);
+    s->Printf("ObjectContainerBSDArchive, num_archs = %zu, num_objects = %zu", num_archs, num_objects);
     uint32_t i;
     ArchSpec arch;
     s->IndentMore();

Modified: lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (original)
+++ lldb/trunk/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Thu Oct 31 18:55:19 2013
@@ -70,12 +70,12 @@ PtraceWrapper(int req, lldb::pid_t pid,
     Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
 
     if (log) {
-        log->Printf("ptrace(%s, %lu, %p, %x) called from file %s line %d",
+        log->Printf("ptrace(%s, %" PRIu64 ", %p, %x) called from file %s line %d",
                     reqName, pid, addr, data, file, line);
         if (req == PT_IO) {
             struct ptrace_io_desc *pi = (struct ptrace_io_desc *) addr;
             
-            log->Printf("PT_IO: op=%s offs=%zx size=%ld",
+            log->Printf("PT_IO: op=%s offs=%zx size=%zu",
                      Get_PT_IO_OP(pi->piod_op), (size_t)pi->piod_offs, pi->piod_len);
         }
     }

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Thu Oct 31 18:55:19 2013
@@ -910,15 +910,15 @@ SymbolContextSpecifier::GetDescription (
         s->Printf ("File: %s", path_str);
         if (m_type == eLineStartSpecified)
         {
-            s->Printf (" from line %lu", m_start_line);
+            s->Printf (" from line %zu", m_start_line);
             if (m_type == eLineEndSpecified)
-                s->Printf ("to line %lu", m_end_line);
+                s->Printf ("to line %zu", m_end_line);
             else
                 s->Printf ("to end");
         }
         else if (m_type == eLineEndSpecified)
         {
-            s->Printf (" from start to line %ld", m_end_line);
+            s->Printf (" from start to line %zu", m_end_line);
         }
         s->Printf (".\n");
     }
@@ -926,16 +926,16 @@ SymbolContextSpecifier::GetDescription (
     if (m_type == eLineStartSpecified)
     {
         s->Indent();
-        s->Printf ("From line %lu", m_start_line);
+        s->Printf ("From line %zu", m_start_line);
         if (m_type == eLineEndSpecified)
-            s->Printf ("to line %lu", m_end_line);
+            s->Printf ("to line %zu", m_end_line);
         else
             s->Printf ("to end");
         s->Printf (".\n");
     }
     else if (m_type == eLineEndSpecified)
     {
-        s->Printf ("From start to line %ld.\n", m_end_line);
+        s->Printf ("From start to line %zu.\n", m_end_line);
     }
     
     if (m_type == eFunctionSpecified)

Modified: lldb/trunk/source/Symbol/Symtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Symtab.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Symtab.cpp (original)
+++ lldb/trunk/source/Symbol/Symtab.cpp Thu Oct 31 18:55:19 2013
@@ -90,14 +90,14 @@ Symtab::Dump (Stream *s, Target *target,
         object_name = m_objfile->GetModule()->GetObjectName().GetCString();
 
     if (file_spec)
-        s->Printf("Symtab, file = %s%s%s%s, num_symbols = %lu",
+        s->Printf("Symtab, file = %s%s%s%s, num_symbols = %zu",
         file_spec.GetPath().c_str(),
         object_name ? "(" : "",
         object_name ? object_name : "",
         object_name ? ")" : "",
         m_symbols.size());
     else
-        s->Printf("Symtab, num_symbols = %lu", m_symbols.size());
+        s->Printf("Symtab, num_symbols = %zu", m_symbols.size());
 
     if (!m_symbols.empty())
     {
@@ -166,7 +166,7 @@ Symtab::Dump(Stream *s, Target *target,
     const size_t num_symbols = GetNumSymbols();
     //s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
     s->Indent();
-    s->Printf("Symtab %lu symbol indexes (%lu symbols total):\n", indexes.size(), m_symbols.size());
+    s->Printf("Symtab %zu symbol indexes (%zu symbols total):\n", indexes.size(), m_symbols.size());
     s->IndentMore();
 
     if (!indexes.empty())

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=193832&r1=193831&r2=193832&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu Oct 31 18:55:19 2013
@@ -634,7 +634,7 @@ Target::CreateWatchpoint(lldb::addr_t ad
         if (!CheckIfWatchpointsExhausted(this, error))
         {
             if (!OptionGroupWatchpoint::IsWatchSizeSupported(size))
-                error.SetErrorStringWithFormat("watch size of %lu is not supported", size);
+                error.SetErrorStringWithFormat("watch size of %zu is not supported", size);
         }
         wp_sp.reset();
     }





More information about the lldb-commits mailing list