Build Fix.

There are build errors on IVI when doing signed and unsigned comparisons.
This patch fixes the issues.