Fix some cppcheck reports