Fix compile warning

* using format '%zu' for size_t
* remove useless local variable