Fixed GCC compiler warning

Fixed a compiler warning by removing an unused variable

Refs #2057