Fix sign-compare error resulted from promoting unsigned integers to signed larger ints

Clang and gcc know not to warn in these cases, but not nonmainstream compilers
1 file changed