lint: fix some issues introduced by the latest PRs

Locally cppcheck threw some errors and warnings at me. Since the PRs are merged I've got no idea on how to get to the according Travis logs, but either the build failed an the PRs got merged nonetheless or the builds didn't fail (which would question the correctness of our cppcheck integration tests (or the correctness of cppcheck itself further).
Anyways: here are the necessary fixes. I'll keep an eye out for more issues like that.