Fix clang -Werror build break due to mismatched sign comparison.