Build Fix.

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

(cherry picked from commit 837bf72fbb866e157839336495a60c61d6b94192)