Fixing compiler warnings for signed/unsigned integer comparisons