aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mac/file_id.cc2
-rw-r--r--src/common/mac/macho_id.cc2
-rw-r--r--src/common/memory.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/common/mac/file_id.cc b/src/common/mac/file_id.cc
index a2ee320b..c5d7ed56 100644
--- a/src/common/mac/file_id.cc
+++ b/src/common/mac/file_id.cc
@@ -61,7 +61,7 @@ bool FileID::FileIdentifier(unsigned char identifier[16]) {
unsigned char buffer[4096 * 2];
size_t buffer_size = sizeof(buffer);
while ((buffer_size = read(fd, buffer, buffer_size) > 0)) {
- MD5Update(&md5, buffer, buffer_size);
+ MD5Update(&md5, buffer, static_cast<unsigned>(buffer_size));
}
close(fd);
diff --git a/src/common/mac/macho_id.cc b/src/common/mac/macho_id.cc
index aa2cfc83..09a2a82e 100644
--- a/src/common/mac/macho_id.cc
+++ b/src/common/mac/macho_id.cc
@@ -125,7 +125,7 @@ void MachoID::UpdateCRC(unsigned char *bytes, size_t size) {
}
void MachoID::UpdateMD5(unsigned char *bytes, size_t size) {
- MD5Update(&md5_context_, bytes, size);
+ MD5Update(&md5_context_, bytes, static_cast<unsigned>(size));
}
void MachoID::Update(MachoWalker *walker, off_t offset, size_t size) {
diff --git a/src/common/memory.h b/src/common/memory.h
index f2e39104..a4636059 100644
--- a/src/common/memory.h
+++ b/src/common/memory.h
@@ -142,10 +142,10 @@ class PageAllocator {
size_t num_pages; // the number of pages in this set.
};
- const unsigned page_size_;
+ const size_t page_size_;
PageHeader *last_;
uint8_t *current_page_;
- unsigned page_offset_;
+ size_t page_offset_;
};
// Wrapper to use with STL containers