Fix typecast warnings.

Build now is using more Clang warnings.
Merge branch 'api' into develop
Merge branch 'api' into develop