Unreachable code fixes.

Just a few minor fixes as reported by cppcheck tool.