Fixing unused variable warnings.

Refs #1777.
Merge pull request #2939 from jwpeterson/fixing_warnings

Fixing unused variable warnings.
Merge commit '912a7369c820ff1fd8b19a7dfbd56b4a1832ac00'