fix compiler warning about sign-compare