aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/breakpad_nlist_64.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-09-29 16:14:01 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-09-29 16:14:01 +0000
commit9dfe692010fa5ff96ba4c5dc5fa59fa63ab2ceab (patch)
treea07311595f0450b17fdb5511d036180d0388c1a6 /src/client/mac/handler/breakpad_nlist_64.cc
parentBuild the Mac Breakpad utilities with the 10.5 SDK in x86_64 Debug mode. This (diff)
downloadbreakpad-9dfe692010fa5ff96ba4c5dc5fa59fa63ab2ceab.tar.xz
Fix some compilation warnings and other errors due to API changes
Review URL: http://breakpad.appspot.com/305002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@841 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/breakpad_nlist_64.cc')
-rw-r--r--src/client/mac/handler/breakpad_nlist_64.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/mac/handler/breakpad_nlist_64.cc b/src/client/mac/handler/breakpad_nlist_64.cc
index 709e8546..4d9bbcc7 100644
--- a/src/client/mac/handler/breakpad_nlist_64.cc
+++ b/src/client/mac/handler/breakpad_nlist_64.cc
@@ -189,10 +189,10 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
struct exec buf;
if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) ||
- (N_BADMAG(buf) && *((long *)&buf) != magic &&
+ (N_BADMAG(buf) && *((uint32_t *)&buf) != magic &&
NXSwapBigLongToHost(*((long *)&buf)) != FAT_MAGIC) &&
/* The following is the big-endian ppc64 check */
- (*((long*)&buf)) != FAT_MAGIC) {
+ (*((uint32_t*)&buf)) != FAT_MAGIC) {
return -1;
}
@@ -232,7 +232,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
}
if (read(fd, (char *)fat_archs,
sizeof(struct fat_arch) * fh.nfat_arch) !=
- (ssize_t)sizeof(struct fat_arch) * fh.nfat_arch) {
+ (ssize_t)(sizeof(struct fat_arch) * fh.nfat_arch)) {
free(fat_archs);
return -1;
}
@@ -296,7 +296,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
return -1;
}
if (read(fd, (char *)load_commands, mh.sizeofcmds) !=
- mh.sizeofcmds) {
+ (ssize_t)mh.sizeofcmds) {
free(load_commands);
return -1;
}
@@ -304,7 +304,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
struct load_command *lcp = load_commands;
// iterate through all load commands, looking for
// LC_SYMTAB load command
- for (long i = 0; i < mh.ncmds; i++) {
+ for (uint32_t i = 0; i < mh.ncmds; i++) {
if (lcp->cmdsize % sizeof(word_type) != 0 ||
lcp->cmdsize <= 0 ||
(char *)lcp + lcp->cmdsize >