Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warning.