From 3acfe1a3d93e675812bc2528c0341ced1d5c4513 Mon Sep 17 00:00:00 2001 From: Andy Gibbs Date: Mon, 29 Dec 2014 13:03:19 +0000 Subject: [PATCH] Fix trivial signed/unsigned comparison warnings llvm-svn: 224932 --- lldb/source/DataFormatters/StringPrinter.cpp | 4 ++-- lldb/source/Symbol/CompactUnwindInfo.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp index 571ef2f..3af5931 100644 --- a/lldb/source/DataFormatters/StringPrinter.cpp +++ b/lldb/source/DataFormatters/StringPrinter.cpp @@ -408,7 +408,7 @@ DumpUTFBufferToStream (ConversionResult (*ConvertFunction) (const SourceDataType printable_size = 1; next_data = utf8_data_ptr+1; } - for (int c = 0; c < printable_size; c++) + for (unsigned c = 0; c < printable_size; c++) stream.Printf("%c", *(printable_bytes+c)); utf8_data_ptr = (uint8_t*)next_data; } @@ -500,7 +500,7 @@ ReadStringAndDumpToStream (ReadStringAndDumpToStreamOp printable_size = 1; next_data = data+1; } - for (int c = 0; c < printable_size; c++) + for (unsigned c = 0; c < printable_size; c++) options.GetStream()->Printf("%c", *(printable_bytes+c)); data = (uint8_t*)next_data; } diff --git a/lldb/source/Symbol/CompactUnwindInfo.cpp b/lldb/source/Symbol/CompactUnwindInfo.cpp index 0777b64..8c6a2e7 100644 --- a/lldb/source/Symbol/CompactUnwindInfo.cpp +++ b/lldb/source/Symbol/CompactUnwindInfo.cpp @@ -298,7 +298,7 @@ CompactUnwindInfo::ScanIndex (const ProcessSP &process_sp) // }; offset = indexSectionOffset; - for (int idx = 0; idx < indexCount; idx++) + for (uint32_t idx = 0; idx < indexCount; idx++) { uint32_t function_offset = m_unwindinfo_data.GetU32(&offset); // functionOffset uint32_t second_level_offset = m_unwindinfo_data.GetU32(&offset); // secondLevelPagesSectionOffset @@ -886,7 +886,7 @@ CompactUnwindInfo::CreateUnwindPlan_x86_64 (Target &target, FunctionInfo &functi int registers[6]; bool used[7] = { false, false, false, false, false, false, false }; - for (int i = 0; i < register_count; i++) + for (uint32_t i = 0; i < register_count; i++) { int renum = 0; for (int j = 1; j < 7; j++) @@ -1160,7 +1160,7 @@ CompactUnwindInfo::CreateUnwindPlan_i386 (Target &target, FunctionInfo &function int registers[6]; bool used[7] = { false, false, false, false, false, false, false }; - for (int i = 0; i < register_count; i++) + for (uint32_t i = 0; i < register_count; i++) { int renum = 0; for (int j = 1; j < 7; j++) -- 2.7.4