ThreadSanitizer plugin: match for loop variable with expected type
authorEd Maste <emaste@freebsd.org>
Sat, 22 Apr 2017 01:38:54 +0000 (01:38 +0000)
committerEd Maste <emaste@freebsd.org>
Sat, 22 Apr 2017 01:38:54 +0000 (01:38 +0000)
Removes Clang warning ThreadSanitizerRuntime.cpp:591:21: warning:
comparison of integers of different signs: 'int' and 'size_t' (aka
'unsigned long') [-Wsign-compare]

llvm-svn: 301067

lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp

index cbc77eb..562d988 100644 (file)
@@ -588,7 +588,7 @@ addr_t ThreadSanitizerRuntime::GetFirstNonInternalFramePc(
   ModuleSP runtime_module_sp = GetRuntimeModuleSP();
 
   StructuredData::Array *trace_array = trace->GetAsArray();
-  for (int i = 0; i < trace_array->GetSize(); i++) {
+  for (size_t i = 0; i < trace_array->GetSize(); i++) {
     if (skip_one_frame && i == 0)
       continue;