aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-21 07:58:25 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-21 07:58:25 +0000
commitf1489baeb7376ea1e1041de09e24a67a05e11a15 (patch)
tree50931d3cadd06a6524c012f69fe7174dfd466f38 /src/common/mac
parentUpdate GTM files to latest from (diff)
downloadbreakpad-f1489baeb7376ea1e1041de09e24a67a05e11a15.tar.xz
Turn on more warnings in ios / mac projects.
Make casts explicit. This makes casts that loose precision explicit, from here on we will get warnings. The changes in this commit are made without evaluating each cast, asuming the original casts were intentional. Patch by: jakerr@google.com Review: https://breakpad.appspot.com/453002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1046 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac')
-rw-r--r--src/common/mac/file_id.cc6
-rw-r--r--src/common/mac/macho_walker.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc
index 50502e4c..b81cf834 100644
--- a/src/common/mac/file_id.cc
+++ b/src/common/mac/file_id.cc
@@ -90,8 +90,10 @@ void FileID::ConvertIdentifierToString(const unsigned char identifier[16],
if (idx == 4 || idx == 6 || idx == 8 || idx == 10)
buffer[buffer_idx++] = '-';
- buffer[buffer_idx++] = (hi >= 10) ? 'A' + hi - 10 : '0' + hi;
- buffer[buffer_idx++] = (lo >= 10) ? 'A' + lo - 10 : '0' + lo;
+ buffer[buffer_idx++] =
+ static_cast<char>((hi >= 10) ? ('A' + hi - 10) : ('0' + hi));
+ buffer[buffer_idx++] =
+ static_cast<char>((lo >= 10) ? ('A' + lo - 10) : ('0' + lo));
}
// NULL terminate
diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc
index 92da7b1f..eb915c39 100644
--- a/src/common/mac/macho_walker.cc
+++ b/src/common/mac/macho_walker.cc
@@ -111,7 +111,7 @@ bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) {
if (offset + size > memory_size_) {
if (static_cast<size_t>(offset) >= memory_size_)
return false;
- size = memory_size_ - offset;
+ size = memory_size_ - static_cast<size_t>(offset);
result = false;
}
memcpy(buffer, static_cast<char *>(memory_) + offset, size);