avoid gcc unsigned/signed comparison warning