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
This commit is contained in:
Sylvestre Ledru
2013-10-31 23:55:19 +00:00
parent 60bd35012a
commit 779f921311
14 changed files with 53 additions and 53 deletions

View File

@@ -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;
}