Fix the Linux build on Ubuntu 12.04 LTS

This fixes the build, which fails because the initialization values
for an array of struct sigaction cannot be { 0 }.

+ Get rid of warning related to unused return value for ftruncate()

BUG=492
Review URL: https://breakpad.appspot.com/447002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1027 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
digit@chromium.org 2012-09-06 14:24:05 +00:00
parent f792eecd1e
commit b6514a8133

View File

@ -117,7 +117,7 @@ const int kExceptionSignals[] = {
};
const int kNumHandledSignals =
sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]);
struct sigaction old_handlers[kNumHandledSignals] = {0};
struct sigaction old_handlers[kNumHandledSignals];
bool handlers_installed = false;
// InstallAlternateStackLocked will store the newly installed stack in new_stack
@ -524,7 +524,7 @@ bool ExceptionHandler::WriteMinidump() {
// Reposition the FD to its beginning and resize it to get rid of the
// previous minidump info.
lseek(minidump_descriptor_.fd(), 0, SEEK_SET);
ftruncate(minidump_descriptor_.fd(), 0);
static_cast<void>(ftruncate(minidump_descriptor_.fd(), 0));
}
// Allow ourselves to be dumped.