fix cppcheck: scope finding