fix cppcheck warnings
fix cppcheck warnings