Refs #9369 Remove unused variables.

This should fix the CppCheck warnings on develop.
Merge branch 'feature/9369_upgrade_history_gui' into develop