Bug 666646 - Fix warnings in toolkit/crashreporter and suppress MSVC warning in third-party Breakpad code. r=ted

This commit is contained in:
Chris Peterson 2014-05-14 20:11:14 -07:00
parent 042ab281b5
commit 30cde70b29
5 changed files with 12 additions and 8 deletions

View File

@ -281,7 +281,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
off_t sa; /* symbol address */
off_t ss; /* start of strings */
register register_t n;
register_t n;
if (*((unsigned int *)&buf) == magic) {
if (lseek(fd, arch_offset, SEEK_SET) == -1) {
return -1;
@ -354,7 +354,7 @@ int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames,
// and look for a match
while (n) {
nlist_type space[BUFSIZ/sizeof (nlist_type)];
register register_t m = sizeof (space);
register_t m = sizeof (space);
if (n < m)
m = n;

View File

@ -221,7 +221,6 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler {
// Used internally by the handler. Full definitions are in
// dwarf_cu_to_module.cc.
struct FilePrivate;
struct Specification;
struct CUContext;
struct DIEContext;

View File

@ -62,10 +62,8 @@ bool Tokenize(char *line,
}
// If there's anything left, just add it as a single token.
if (!remaining > 0) {
if ((token = strtok_r(NULL, "\r\n", &save_ptr))) {
tokens->push_back(token);
}
if (remaining == 0 && (token = strtok_r(NULL, "\r\n", &save_ptr))) {
tokens->push_back(token);
}
return tokens->size() == static_cast<unsigned int>(max_tokens);

View File

@ -103,3 +103,10 @@ LOCAL_INCLUDES += [
'google-breakpad/src',
]
# Suppress warnings in third-party code.
if CONFIG['_MSC_VER']:
CXXFLAGS += [
'-wd4005', # macro redefinition
]
FAIL_ON_WARNINGS = True

View File

@ -773,7 +773,7 @@ bool MinidumpCallback(
if (eventloopNestingLevel > 0) {
unused << sys_write(fd, kEventLoopNestingLevelParameter, kEventLoopNestingLevelParameterLen);
char buffer[16];
XP_TTOA(eventloopNestingLevel, buffer, 10);
XP_TTOA(static_cast<time_t>(eventloopNestingLevel), buffer, 10);
unused << sys_write(fd, buffer, my_strlen(buffer));
unused << sys_write(fd, "\n", 1);
}