[Lldb-commits] [lldb] r224932 - Fix trivial signed/unsigned comparison warnings
Andy Gibbs
andyg1001 at hotmail.co.uk
Mon Dec 29 05:03:19 PST 2014
Author: andyg
Date: Mon Dec 29 07:03:19 2014
New Revision: 224932
URL: http://llvm.org/viewvc/llvm-project?rev=224932&view=rev
Log:
Fix trivial signed/unsigned comparison warnings
Modified:
lldb/trunk/source/DataFormatters/StringPrinter.cpp
lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
Modified: lldb/trunk/source/DataFormatters/StringPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/StringPrinter.cpp?rev=224932&r1=224931&r2=224932&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/StringPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/StringPrinter.cpp Mon Dec 29 07:03:19 2014
@@ -408,7 +408,7 @@ DumpUTFBufferToStream (ConversionResult
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<StringElementT
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;
}
Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=224932&r1=224931&r2=224932&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original)
+++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Mon Dec 29 07:03:19 2014
@@ -298,7 +298,7 @@ CompactUnwindInfo::ScanIndex (const Proc
// };
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_
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
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++)
More information about the lldb-commits
mailing list