Fix a few cppcheck findings
Merge pull request #1472 from LudwigOrtmann/cpp-check-a-bit

Fix a few cppcheck findings