Remove compiler warnings.

- remove warnings generated by -Wsign-compare flag.
Remove compiler warnings.

-remove warnings generated by -Wunused-function and
-Wmaybe-uninitialized flags
Remove compiler warnings.

- remove unused variables (warning -Wunused-variable)
Remove compiler warnings.

- remove warning -Wparentheses