diff options
author | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-03-07 00:18:29 +0000 |
---|---|---|
committer | qsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-03-07 00:18:29 +0000 |
commit | af7d5ccf7bc835551d18f2b4374177378211b160 (patch) | |
tree | 2629f72da0869640558f29b995b261e338b7f96d /src/client/mac/handler/minidump_generator.cc | |
parent | Send uptime as milliseconds for Mac and iOS. (diff) | |
download | breakpad-af7d5ccf7bc835551d18f2b4374177378211b160.tar.xz |
Correct various compilation warnings.
- Cast result of _dyld_image_count to prevent compilation warning: The 2 int
in both side of the ? operator should have the same type.
- Remove unused variable for return values.
- Remove unused NSUserDefaults.
Review URL: https://breakpad.appspot.com/354001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@929 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/minidump_generator.cc')
-rw-r--r-- | src/client/mac/handler/minidump_generator.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc index 1e4ea6b5..b1d429cf 100644 --- a/src/client/mac/handler/minidump_generator.cc +++ b/src/client/mac/handler/minidump_generator.cc @@ -1318,8 +1318,9 @@ bool MinidumpGenerator::WriteModuleListStream( MDRawDirectory *module_list_stream) { TypedMDRVA<MDRawModuleList> list(&writer_); - int image_count = dynamic_images_ ? - dynamic_images_->GetImageCount() : _dyld_image_count(); + size_t image_count = dynamic_images_ ? + static_cast<size_t>(dynamic_images_->GetImageCount()) : + _dyld_image_count(); if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) return false; @@ -1330,7 +1331,7 @@ bool MinidumpGenerator::WriteModuleListStream( // Write out the executable module as the first one MDRawModule module; - int executableIndex = FindExecutableModule(); + size_t executableIndex = FindExecutableModule(); if (!WriteModuleStream(executableIndex, &module)) { return false; @@ -1339,7 +1340,7 @@ bool MinidumpGenerator::WriteModuleListStream( list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); int destinationIndex = 1; // Write all other modules after this one - for (int i = 0; i < image_count; ++i) { + for (size_t i = 0; i < image_count; ++i) { if (i != executableIndex) { if (!WriteModuleStream(i, &module)) { return false; |