mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 08:15:27 +00:00
Fixing compiler warnings:
- Building Breakpad in Xcode with arm64 architecture. - iOS Patches provided by: Ian Hickson and Greg Vance. R=mark@chromium.org Review URL: https://breakpad.appspot.com/1184003 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1286 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
70acad5df8
commit
1df13fed15
|
@ -98,7 +98,7 @@ class ProtectedMemoryLocker {
|
|||
: mutex_(mutex),
|
||||
allocator_(allocator) {
|
||||
// Lock the mutex
|
||||
int rv = pthread_mutex_lock(mutex_);
|
||||
__attribute__((unused)) int rv = pthread_mutex_lock(mutex_);
|
||||
assert(rv == 0);
|
||||
|
||||
// Unprotect the memory
|
||||
|
@ -110,7 +110,7 @@ class ProtectedMemoryLocker {
|
|||
allocator_->Protect();
|
||||
|
||||
// Then unlock the mutex
|
||||
int rv = pthread_mutex_unlock(mutex_);
|
||||
__attribute__((unused)) int rv = pthread_mutex_unlock(mutex_);
|
||||
assert(rv == 0);
|
||||
};
|
||||
|
||||
|
|
|
@ -1479,13 +1479,13 @@ bool MinidumpGenerator::WriteModuleListStream(
|
|||
|
||||
module_list_stream->stream_type = MD_MODULE_LIST_STREAM;
|
||||
module_list_stream->location = list.location();
|
||||
list.get()->number_of_modules = image_count;
|
||||
list.get()->number_of_modules = static_cast<uint32_t>(image_count);
|
||||
|
||||
// Write out the executable module as the first one
|
||||
MDRawModule module;
|
||||
uint32_t executableIndex = FindExecutableModule();
|
||||
|
||||
if (!WriteModuleStream(executableIndex, &module)) {
|
||||
if (!WriteModuleStream(static_cast<unsigned>(executableIndex), &module)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1494,7 +1494,7 @@ bool MinidumpGenerator::WriteModuleListStream(
|
|||
|
||||
for (uint32_t i = 0; i < image_count; ++i) {
|
||||
if (i != executableIndex) {
|
||||
if (!WriteModuleStream(i, &module)) {
|
||||
if (!WriteModuleStream(static_cast<unsigned>(i), &module)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue