Remove unused variables.

Fixes -Wunused-variable and -Wunused-but-set-variable on gcc 4.7.2.