Fixing some cppcheck violations.