Refs #9369 Remove unused variables.

This should fix the CppCheck warnings on develop.