[Code] Small code cleanups

Mostly to silence a warnings from cppcheck

[ci-skip]