Various smaller fixes.
- Enable unreachable code warnings.
- Fixing some of the cppcheck warnings.
Review commit-wise.
I omitted some of the clang-format not to obscure the actual changes.
Review commit-wise.
I omitted some of the clang-format not to obscure the actual changes.