Fix gcc's -Wunused-but-set-variable warnings.