fix cppcheck warning