Lately I’ve been getting a “control reaches end of non-void function” warning when compiling. Although it didn’t make any sense since I was not returning any value and the function had a return type of void, the code ran fine too. A few days later it hit me, I had made a typo in the return type.
- (void*)load { }
Lesson of the day: a return type of (void*) does the job, but (void) does it better.