sanitise sign comparisons

This is a mechanical change addressing the various sign comparison warnings that
are identified by both clang and gcc.  This helps cleanup some of the warning
spew that occurs during builds.

llvm-svn: 205390
diff --git a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
index 1768798..ff7f758 100644
--- a/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
+++ b/lldb/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
@@ -479,7 +479,8 @@
     const bool prefer_file_cache = true;
     Error error;
     Target *target = m_exe_ctx.GetTargetPtr();
-    if (target->ReadMemory (addr, prefer_file_cache, opcode_data.data(), max_op_byte_size, error) == -1)
+    if (target->ReadMemory (addr, prefer_file_cache, opcode_data.data(),
+                            max_op_byte_size, error) == static_cast<size_t>(-1))
     {
         return false;
     }
@@ -552,7 +553,8 @@
             // An unrecognized/junk instruction
             break;
         }
-        if (target->ReadMemory (m_cur_insn, prefer_file_cache, m_cur_insn_bytes, insn_len, error) == -1)
+        if (target->ReadMemory (m_cur_insn, prefer_file_cache, m_cur_insn_bytes,
+                                insn_len, error) == static_cast<size_t>(-1))
         {
            // Error reading the instruction out of the file, stop scanning
            break;
@@ -600,7 +602,7 @@
             bool need_to_push_row = false;
             // the PUSH instruction has moved the stack pointer - if the CFA is set in terms of the stack pointer,
             // we need to add a new row of instructions.
-            if (row->GetCFARegister() == m_lldb_sp_regnum)
+            if (row->GetCFARegister() == static_cast<uint32_t>(m_lldb_sp_regnum))
             {
                 need_to_push_row = true;
                 row->SetCFAOffset (current_sp_bytes_offset_from_cfa);
@@ -645,7 +647,7 @@
         if (sub_rsp_pattern_p (stack_offset))
         {
             current_sp_bytes_offset_from_cfa += stack_offset;
-            if (row->GetCFARegister() == m_lldb_sp_regnum)
+            if (row->GetCFARegister() == static_cast<uint32_t>(m_lldb_sp_regnum))
             {
                 row->SetOffset (current_func_text_offset + insn_len);
                 row->SetCFAOffset (current_sp_bytes_offset_from_cfa);
@@ -699,7 +701,8 @@
         uint8_t bytebuf[7];
         Address last_seven_bytes(end_of_fun);
         last_seven_bytes.SetOffset (last_seven_bytes.GetOffset() - 7);
-        if (target->ReadMemory (last_seven_bytes, prefer_file_cache, bytebuf, 7, error) != -1)
+        if (target->ReadMemory (last_seven_bytes, prefer_file_cache, bytebuf, 7,
+                                error) != static_cast<size_t>(-1))
         {
             if (bytebuf[5] == 0x5d && bytebuf[6] == 0xc3)  // mov, ret
             {
@@ -715,7 +718,8 @@
         uint8_t bytebuf[2];
         Address last_two_bytes(end_of_fun);
         last_two_bytes.SetOffset (last_two_bytes.GetOffset() - 2);
-        if (target->ReadMemory (last_two_bytes, prefer_file_cache, bytebuf, 2, error) != -1)
+        if (target->ReadMemory (last_two_bytes, prefer_file_cache, bytebuf, 2,
+                                error) != static_cast<size_t>(-1))
         {
             if (bytebuf[0] == 0x5d && bytebuf[1] == 0xc3) // mov, ret
             {
@@ -776,7 +780,8 @@
     uint8_t bytebuf[4];
     Error error;
     const bool prefer_file_cache = true;
-    if (target->ReadMemory (func.GetBaseAddress(), prefer_file_cache, bytebuf, sizeof (bytebuf), error) == -1)
+    if (target->ReadMemory (func.GetBaseAddress(), prefer_file_cache, bytebuf,
+                            sizeof (bytebuf), error) == static_cast<size_t>(-1))
         return false;
 
     uint8_t i386_prologue[] = {0x55, 0x89, 0xe5};
@@ -859,7 +864,8 @@
             // An error parsing the instruction, i.e. probably data/garbage - stop scanning
             break;
         }
-        if (target->ReadMemory (m_cur_insn, prefer_file_cache, m_cur_insn_bytes, insn_len, error) == -1)
+        if (target->ReadMemory (m_cur_insn, prefer_file_cache, m_cur_insn_bytes,
+                                insn_len, error) == static_cast<size_t>(-1))
         {
            // Error reading the instruction out of the file, stop scanning
            break;