summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-15 23:03:34 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-15 23:03:34 (GMT)
commit652b162a297d33d3bf4060a5bcfea541f392e972 (patch)
treebe1c97b341052e4c40e7d148d919b4779901e7ea /Source/cmCTest.cxx
parent67285f9a7674734c3e0afdb0cf9f84b5b9a1c32d (diff)
downloadCMake-652b162a297d33d3bf4060a5bcfea541f392e972.zip
CMake-652b162a297d33d3bf4060a5bcfea541f392e972.tar.gz
CMake-652b162a297d33d3bf4060a5bcfea541f392e972.tar.bz2
ERR: Inner loop used the same counter as outer. Broke coverage code
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 3f5407a..af5b608 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1395,31 +1395,31 @@ int cmCTest::CoverageDirectory()
}
cov.m_Show = true;
}
+ std::string::size_type kk;
+ for ( kk = 0; kk < lines.size(); kk ++ )
// std::cerr << "number of lines " << lines.size() << "\n";
- for ( cc = 0; cc < lines.size(); cc ++ )
- {
- std::string& line = lines[cc];
+ std::string& line = lines[kk];
//std::cerr << line << "\n";
std::string sub = line.substr(0, strlen(" ######"));
int count = atoi(sub.c_str());
if ( sub.compare(0, strlen(" #####"), " #####") == 0
|| sub.compare(" ######") == 0 )
{
- if ( covlines[cc] == -1 )
+ if ( covlines[kk] == -1 )
{
- covlines[cc] = 0;
+ covlines[kk] = 0;
}
cov.m_UnTested ++;
//std::cout << "Untested - ";
}
else if ( count > 0 )
{
- if ( covlines[cc] == -1 )
+ if ( covlines[kk] == -1 )
{
- covlines[cc] = 0;
+ covlines[kk] = 0;
}
cov.m_Tested ++;
- covlines[cc] += count;
+ covlines[kk] += count;
//std::cout << "Tested[" << count << "] - ";
}