Removed unused variables to make gcc 4.7 happy, patch provided by Makoto Fujiwara