Fix compilation error(unused variable, signed/unsigned comparison).