Buried in warnings
Buried in warnings
Posted Nov 2, 2006 16:10 UTC (Thu) by NAR (subscriber, #1313)In reply to: Buried in warnings by JoeBuck
Parent article: Buried in warnings
I know it's just a made-up code, but if the pointer is really not used in do_something_else(), couldn't you just write:
do_something_else();
if (some_condition_is_true()) {
some_type* pointer = expensive_allocation_function();
use_the_fine(pointer);
}
I guess if the pointer is not used in do_something_else(), the function can't really use the things allocated there. Or does this syntax only work in C++? In this case it's too bad...
Anyway, just to reflect to the questioning of code quality in closed software (in a separate thread), we've had quarter-million lines of C++ code compiling without a single warning...
