Fix compile errors with -Wunused-but-set-variable

GCC 4.7.2 on Debian Wheezy