cppcheck: fix unreadVariable