Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(130)

Issue 447002: Fix the Linux build on Ubuntu 12.04 LTS (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by digit
Modified:
12 years, 2 months ago
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

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
Committed: https://code.google.com/p/google-breakpad/source/detail?r=1027

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/client/linux/handler/exception_handler.cc View 2 chunks +2 lines, -2 lines 3 comments Download

Messages

Total messages: 3
Ted Mielczarek
LGTM https://breakpad.appspot.com/447002/diff/1/src/client/linux/handler/exception_handler.cc File src/client/linux/handler/exception_handler.cc (right): https://breakpad.appspot.com/447002/diff/1/src/client/linux/handler/exception_handler.cc#newcode120 src/client/linux/handler/exception_handler.cc:120: struct sigaction old_handlers[kNumHandledSignals]; This is probably okay since ...
12 years, 2 months ago #1
digit
For some reason, I didn't put Mark as a reviewer on this. Done.
12 years, 2 months ago #2
Mark Mentovai
12 years, 2 months ago #3
Oh. This has already been committed.

In the future, please separate the real I’m-broken fixes out from the
fix-a-stupid-warning fixes.

Anyway, it’s dumb that ftruncate is warn-unused-result, but I think that we can
make an exception to the casting rules and say that it’s OK to just write (void)
when you need to silence that warning. That’s an understood pattern, and
static_cast<void> is ugly and takes up space and isn’t quite as likely to be
immediately understood as the warn-unused-result-avoiding pattern.

http://breakpad.appspot.com/447002/diff/1/src/client/linux/handler/exception_...
File src/client/linux/handler/exception_handler.cc (right):

http://breakpad.appspot.com/447002/diff/1/src/client/linux/handler/exception_...
src/client/linux/handler/exception_handler.cc:120: struct sigaction
old_handlers[kNumHandledSignals];
Ted Mielczarek wrote:
> This is probably okay since we don't actually use the values here before we
set
> them from calling sigaction. I was just fiddling with this, and you can also
get
> it to compile by changing this to
>  = {{{0}}};
> ...but that's kind of horrible looking.

This is static data. It gets zero-initialized by default no matter what you do.

http://breakpad.appspot.com/447002/diff/1/src/client/linux/handler/exception_...
src/client/linux/handler/exception_handler.cc:527:
static_cast<void>(ftruncate(minidump_descriptor_.fd(), 0));
This is ugly.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted