Avoid warning casts

This pull request doesn't mess up the subproject sha1