diff options
author | dmaclach <dmaclach@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-07-27 23:21:19 +0000 |
---|---|---|
committer | dmaclach <dmaclach@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-07-27 23:21:19 +0000 |
commit | b5b8051a23774eed5fd38518d7a2a85736efc0bc (patch) | |
tree | 7b623b0df0259c69dbe101eafd9f3d062a2f146c /src/client | |
parent | Fixes up some style nits, and gets us compiling on Leopard again. (diff) | |
download | breakpad-b5b8051a23774eed5fd38518d7a2a85736efc0bc.tar.xz |
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
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/minidump_file_writer.cc | 16 |
1 files changed, 8 insertions, 8 deletions
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<u_int32_t>(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<off_t>(position)) { if (sys_write(file_, src, size) == size) { #else - if (lseek(file_, position, SEEK_SET) == position) { + if (lseek(file_, position, SEEK_SET) == static_cast<off_t>(position)) { if (write(file_, src, size) == size) { #endif return true; |