Fixing some sign comparison warnings from MSVC; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221887 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing -Wtype-limits warnings with the asserts (the expression would always evaluate to true). Also fixing a -Wcast-qual warning, where the cast expression isn't required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221888 91177308-0d34-0410-b5e6-96231b3b80d8