Fix compiler warnings when building with CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;

I also have lots of other similar warnings but harder to "fix".