fix a few annoying GCC signed <-> unsigned comparison warnings