From 248d340b715a74e895b0734bf2b12dc6242c0d0d Mon Sep 17 00:00:00 2001 From: "jessicag.feedback@gmail.com" Date: Tue, 1 Mar 2011 20:47:27 +0000 Subject: [PATCH] Fix compiler warning. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@776 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/processor/minidump_dump.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/processor/minidump_dump.cc b/src/processor/minidump_dump.cc index 45179735..9e70a722 100644 --- a/src/processor/minidump_dump.cc +++ b/src/processor/minidump_dump.cc @@ -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( memchr(&contents[current_offset], 0, remaining)); if (next_null == NULL)