resolving cppcheck warning - unused variable. re #9796