Remove compiler warnings on signed comparison