Merge lp:~bregma/compiz/lp-1085581 into lp:compiz/0.9.9
| Status: | Merged |
|---|---|
| Approved by: | Didier Roche on 2012-12-04 |
| Approved revision: | 3501 |
| Merged at revision: | 3500 |
| Proposed branch: | lp:~bregma/compiz/lp-1085581 |
| Merge into: | lp:compiz/0.9.9 |
| Diff against target: |
31 lines (+8/-2) 2 files modified
src/screen.cpp (+4/-1) src/window.cpp (+4/-1) |
| To merge this branch: | bzr merge lp:~bregma/compiz/lp-1085581 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Didier Roche | 2012-12-04 | Approve on 2012-12-04 | |
| PS Jenkins bot | continuous-integration | Pending | |
|
Review via email:
|
|||
Commit Message
Move plugin initialization code out of assert() macro so it still runs even with NDEBUG defined (lp: #1085581).
Description of the Change
= Problem description =
Plugins fail to run when compiz is build using the latest cmake.
= The fix =
Turns out the latest cmake adds a macro definition for NDEBUG when building in release mode (where previously it did not do so). That macro removes code inside an assert() macro, and plugin initialization code in compiz was wrapped in such a macro.
This fix moves that code outside of the macro and checks the result of the code in the macro instead.
= Test coverage =
Existing tests were failing: this change should cause those tests to pass once again.
- 3501. By Stephen M. Webb on 2012-12-04
-
Used the new variables so -Wno-unused does not cause trouble with -DNDEBUG.
| Daniel van Vugt (vanvugt) wrote : | # |
WTF!? Who put important code inside asserts?
| Sam Spilsbury (smspillaz) wrote : | # |
We should probably check the other asserts in the source tree too -
we've been bitten by this change in a few areas now.
On Wed, Dec 5, 2012 at 9:14 AM, Daniel van Vugt
<email address hidden> wrote:
> WTF!? Who put important code inside asserts?
> --
> https:/
> Your team Compiz Maintainers is subscribed to branch lp:compiz.
--
Sam Spilsbury
| Daniel van Vugt (vanvugt) wrote : | # |
I have searched the whole source tree. These two locations are the only dangerous asserts.


Way saner.