cppcheck: fix redundantAssignment