1 GCC rightfully complains about redefined variables, as iterator declarations
2 appear inside loops with a loop variable of the same name.
4 This patch has been sent upstream.
6 --- a/sets.cpp 2015-06-25 11:22:08.252821681 +0200
7 +++ b/sets.cpp 2015-06-25 11:22:23.239187985 +0200
9 //////////////////////////////////////////////
10 // Reset original missing status
12 - vector<Individual*>::iterator i = PP->sample.begin();
13 - while ( i != PP->sample.end() )
14 + vector<Individual*>::iterator it = PP->sample.begin();
15 + while ( it != PP->sample.end() )
17 - (*i)->missing = (*i)->flag;
19 + (*it)->missing = (*it)->flag;
23 ////////////////////////////////////////////////
25 --- a/elf.cpp 2009-10-10 18:00:21.000000000 +0200
26 +++ b/elf.cpp 2015-06-25 11:34:06.136835756 +0200
27 @@ -1175,10 +1175,10 @@
28 << setw(8) << gcnt << " "
29 << setw(8) << (double)cnt / (double)gcnt << "\n";
31 - map<int,int>::iterator i = chr_cnt.begin();
32 - while ( i != chr_cnt.end() )
33 + map<int,int>::iterator it = chr_cnt.begin();
34 + while ( it != chr_cnt.end() )
38 int x = chr_cnt.find( c )->second;
39 int y = chr_gcnt.find( c )->second;
42 << setw(8) << y << " "
43 << setw(8) << (double)x / (double)y << "\n";
51 --- plink-1.07-src/idhelp.cpp 2009-10-10 18:00:22.000000000 +0200
52 +++ plink-1.07-src/idhelp.cpp.patched 2015-06-25 11:37:39.387204086 +0200
54 for (int j = 0 ; j < jointField.size(); j++ )
56 set<IDField*> & jf = jointField[j];
57 - set<IDField*>::iterator j = jf.begin();
58 + set<IDField*>::iterator jit = jf.begin();
60 - while ( j != jf.end() )
61 + while ( jit != jf.end() )
63 - PP->printLOG( (*j)->name + " " );
65 + PP->printLOG( (*jit)->name + " " );