Fix signed/unsigned comparison warnings.
Merge branch 'signed-unsigned-compare-warnings'