Cppcheck

Fix some warnings of cppcheck.