Remove compiler warnings.

- remove warning -Wunused-but-set-variable.