Fixed warning about unused variable.

This commit removes below warnings.

* "warning: assigned but unused variable"
Fixed warning about shadowing outer local variable.

This commit removes below warnings.

* "warning: shadowing outer local variable"
Merge pull request #101 from kachick/improve-remove_warnings

Fixed some warnings