-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a macro to mark unused variables
Summary: When compiling with both `-Wunused-variable` and `-DNDEBUG`, we are getting errors due to unused variables. This is because we have variables that are created and only used in assertions. Let's introduce a `SPARTA_UNUSED` macro that does a static cast to void, which should get optimized away. Let's also use this to introduce `SPARTA_ASSERT` which is just an alias for the C assert, for now. Reviewed By: GerbenJavado Differential Revision: D51588387 fbshipit-source-id: f8ccc03bace8112f6b26fdad850c5fad47f388c4
- Loading branch information
1 parent
a023dfd
commit 8e291da
Showing
4 changed files
with
39 additions
and
23 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