Last Comment Bug 737909 - Fix opt -Werror build with clang
: Fix opt -Werror build with clang
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla14
Assigned To: Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
:
Mentors:
Depends on:
Blocks: clang
  Show dependency treegraph
 
Reported: 2012-03-21 10:02 PDT by Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
Modified: 2012-03-27 06:12 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use abort() instead of assert(0) (780 bytes, patch)
2012-03-21 10:02 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Splinter Review
alternative patch (1.08 KB, patch)
2012-03-21 12:44 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
no flags Details | Diff | Splinter Review
alternative patch (422 bytes, patch)
2012-03-21 12:45 PDT, Rafael Ávila de Espíndola (:espindola) (not reading bugmail)
joe: review+
Details | Diff | Splinter Review

Description Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-03-21 10:02:09 PDT
Created attachment 607997 [details] [diff] [review]
Use abort() instead of assert(0)

The cairo codebase has no general way to mark a place as unreachable (like  MOZ_NOT_REACHED), so I just used a known noreturn function that exits on opt builds too (abort).
Comment 1 Jeff Muizelaar [:jrmuizel] 2012-03-21 11:31:22 PDT
Comment on attachment 607997 [details] [diff] [review]
Use abort() instead of assert(0)

I'd rather us just not build cairo with -Werror. Is that possible?
Comment 2 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-03-21 12:44:23 PDT
Created attachment 608063 [details] [diff] [review]
alternative patch

Turns out that the problem is not a general -Werror, but -Werror=return-type. The bad news is that we don't have support for building just cairo without it. The good news is that it is easier to avoid. The attached patch just adds a dummy return.
Comment 3 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-03-21 12:45:21 PDT
Created attachment 608065 [details] [diff] [review]
alternative patch
Comment 4 Gregor Wagner [:gwagner] 2012-03-21 13:48:19 PDT
Can we get this on mc please?
Comment 5 Joe Drew (not getting mail) 2012-03-22 08:28:15 PDT
Comment on attachment 608065 [details] [diff] [review]
alternative patch

Return kPrivateCGCompositeClear instead.

We also need to add a patch to gfx/cairo/

Note You need to log in before you can comment on or make changes to this bug.