get rid of clang compile warnings

- type conversions (type casts) and no return on non-void function