- Oct 14, 1999
- 4,375
- 0
- 0
Yes, it's true.
I spent several hours trying to help a co worker fix an odd problem with his program: it worked in debug mode, but not in release. After trying just about everything under the sun, I noticed that one of his functions of type bool was only returning a value under certain conditions...in fact, it never returned true, ever.
Of course the compiler knew what was wrong all along.
Warning: Not all control paths return a value.
I never looked at the warnings because I assumed he would have taken care of them. That'll teach me.
I spent several hours trying to help a co worker fix an odd problem with his program: it worked in debug mode, but not in release. After trying just about everything under the sun, I noticed that one of his functions of type bool was only returning a value under certain conditions...in fact, it never returned true, ever.
Of course the compiler knew what was wrong all along.
Warning: Not all control paths return a value.
I never looked at the warnings because I assumed he would have taken care of them. That'll teach me.
