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"
llvm-svn: 193832
diff --git a/lldb/source/Expression/ClangFunction.cpp b/lldb/source/Expression/ClangFunction.cpp
index 8d45d45..b37044d 100644
--- a/lldb/source/Expression/ClangFunction.cpp
+++ b/lldb/source/Expression/ClangFunction.cpp
@@ -173,7 +173,7 @@
}
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 @@
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;
}
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp
index ad396d4..b36be8e 100644
--- a/lldb/source/Expression/DWARFExpression.cpp
+++ b/lldb/source/Expression/DWARFExpression.cpp
@@ -1363,7 +1363,7 @@
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 @@
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;
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp
index 4d14ebd..d68dc00 100644
--- a/lldb/source/Expression/IRForTarget.cpp
+++ b/lldb/source/Expression/IRForTarget.cpp
@@ -2028,7 +2028,7 @@
}
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 @@
}
if (log)
- log->Printf("Total structure [align %" PRId64 ", size %lu]", alignment, size);
+ log->Printf("Total structure [align %" PRId64 ", size %zu]", alignment, size);
return true;
}