Fix the [-Werror=sign-compare] issues

Summary:

Test Plan:

Reviewers:

CC:

Task ID: #

Blame Rev:
Fix some compilation bugs in different platforms

Summary:

detect some problems when testing my 3rd party release tool.