-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors preventing clean compilation with NDEBUG defined
Summary: The intent of these changes is to make sure that we'll compile cleanly with `NDEBUG` defined. Clean compilation is necessary for clearly separating and producing release builds. `NDEBUG` macro is //de facto// way to distinguish between debug and release code paths. It is also notably used in `<assert.h>` to determine the behavior of assertions. There are two types of problems fixed in this set of changes: # Incorrect use of assertions, //i.e.//, assertions have side-effects and are evaluating invariants which are actually meant to be executed in release builds as well. # Warnings caused by unused variables (which when treated as errors will cause build breaks) which are fixed by adding `MY_ATTRIBUTE((unused))` to the variable definitions. Test Plan: ``` mysqlbuild.sh mysqltest.sh mysqltest.sh --testset=RocksDB mysqlbuild.sh --release mysqltest.sh --release mysqltest.sh --release --testset=RocksDB ``` Reviewers: jtolmer, tianx Reviewed By: tianx Subscribers: webscalesql-eng Differential Revision: https://reviews.facebook.net/D54111
- Loading branch information
Gunnar Kudrjavets
authored and
Herman Lee
committed
Jan 24, 2017
1 parent
4f3e2c0
commit 9d9e8bd
Showing
5 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters