Remove unused variables.

Fixes -Wunused-variable and -Wunused-but-set-variable on gcc 4.7.2.
Merge pull request #285 from rillian/warning

Remove unused variables.