Fix compiler warning.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@776 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jessicag.feedback@gmail.com 2011-03-01 20:47:27 +00:00
parent dbf409ca20
commit 248d340b71

View File

@ -77,7 +77,10 @@ static void DumpRawStream(Minidump *minidump,
size_t current_offset = 0;
while (current_offset < length) {
size_t remaining = length - current_offset;
printf("%.*s", remaining, &contents[current_offset]);
// Printf requires an int and direct casting from size_t results
// in compatibility warnings.
u_int32_t int_remaining = remaining;
printf("%.*s", int_remaining, &contents[current_offset]);
char *next_null = reinterpret_cast<char *>(
memchr(&contents[current_offset], 0, remaining));
if (next_null == NULL)