I was just wondering...is the warning implying that non-void functions should never reach the end of a code block? If so can someone please explain why. I just do not want to get into a bad habit. Thanks
is the warning implying that non-void functions should never reach the end of a code block?
Yes
If so can someone please explain why
Because doing so, for any function besides main(), invokes undefined behavior (ยง6.6.3/2 of the standard). As with any case of undefined behavior, the compiled program is allowed to do anything whatsoever.