diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-15 23:03:34 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-12-15 23:03:34 (GMT) |
commit | 652b162a297d33d3bf4060a5bcfea541f392e972 (patch) | |
tree | be1c97b341052e4c40e7d148d919b4779901e7ea /Source/cmCTest.cxx | |
parent | 67285f9a7674734c3e0afdb0cf9f84b5b9a1c32d (diff) | |
download | CMake-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.cxx | 16 |
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 << "] - "; } |