fix clang error/warning

- unused var
- error: cast from pointer to smaller type 'int' loses information