KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a problem with the unused local variable warning in GCC. Often I have code that looks like this: bool success = foo(); assert(success); This is fine for debug builds. In release however, the assert compiles to nothing, and GCC gives me a warning. What is the best way to work around this? Wrapping the bool success = with #ifdef just does not seem like a nice solution...
Tags (comma-separated)
Save Edits
Cancel