From b5b8051a23774eed5fd38518d7a2a85736efc0bc Mon Sep 17 00:00:00 2001 From: dmaclach Date: Tue, 27 Jul 2010 23:21:19 +0000 Subject: Review: http://breakpad.appspot.com/135001 BUG: none TEST: Build GoogleTalk git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@632 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/minidump_file_writer.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/client') diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc index 66d4c690..213e2be0 100644 --- a/src/client/minidump_file_writer.cc +++ b/src/client/minidump_file_writer.cc @@ -92,17 +92,17 @@ bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, } else { u_int16_t out[2]; int out_idx = 0; - + // Copy the string character by character while (length && result) { UTF32ToUTF16Char(*str, out); if (!out[0]) return false; - + // Process one character at a time --length; ++str; - + // Append the one or two UTF-16 characters. The first one will be non- // zero, but the second one may be zero, depending on the conversion from // UTF-32. @@ -127,11 +127,11 @@ bool MinidumpFileWriter::CopyStringToMDString(const char *str, int conversion_count = UTF8ToUTF16Char(str, length, out); if (!conversion_count) return false; - + // Move the pointer along based on the nubmer of converted characters length -= conversion_count; str += conversion_count; - + // Append the one or two UTF-16 characters int out_count = out[1] ? 2 : 1; size_t out_size = sizeof(u_int16_t) * out_count; @@ -161,7 +161,7 @@ bool MinidumpFileWriter::WriteStringCore(const CharType *str, return false; // Set length excluding the NULL and copy the string - mdstring.get()->length = + mdstring.get()->length = static_cast(mdstring_length * sizeof(u_int16_t)); bool result = CopyStringToMDString(str, mdstring_length, &mdstring); @@ -241,10 +241,10 @@ bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { // Seek and write the data #if __linux__ - if (sys_lseek(file_, position, SEEK_SET) == position) { + if (sys_lseek(file_, position, SEEK_SET) == static_cast(position)) { if (sys_write(file_, src, size) == size) { #else - if (lseek(file_, position, SEEK_SET) == position) { + if (lseek(file_, position, SEEK_SET) == static_cast(position)) { if (write(file_, src, size) == size) { #endif return true; -- cgit v1.2.1