Remove compiler warnings.

- remove warnings -Wsign-compare and -Wunused-variable.
Remove compiler warning.

- remove warning 'function used but never defined'
Remove compiler warnings.

- remove warning -Wdelete-non-virtual-dtor