Explicit type casting to prevent warnings about implicit signedness conversion
Merge pull request #1011 from mattrubin/implicit-signedness-conversions

Explicit type casting to prevent warnings