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...