]> git.donarmstrong.com Git - mothur.git/commitdiff
removed various build warnings
authorwestcott <westcott>
Wed, 5 Jan 2011 13:07:39 +0000 (13:07 +0000)
committerwestcott <westcott>
Wed, 5 Jan 2011 13:07:39 +0000 (13:07 +0000)
25 files changed:
clearcut.cpp
clusterclassic.cpp
clustersplitcommand.cpp
distancecommand.cpp
engine.cpp
getgroupscommand.cpp
getotuscommand.cpp
metastats2.c
parsimony.cpp
phylodiversitycommand.cpp
phylosummary.cpp
phylotree.cpp
pipelinepdscommand.cpp
rarefact.cpp
removegroupscommand.cpp
removeotuscommand.cpp
shhhercommand.cpp
splitmatrix.cpp
subsamplecommand.cpp
summarysharedcommand.cpp
trimflowscommand.cpp
trimseqscommand.cpp
unifracweightedcommand.cpp
unweighted.cpp
weighted.cpp

index b06aa5be47d950c13ea33c9d4a1e275b24fe385b..a4bd4501292cd4ca84cdf11cbfe213ef93eebe9a 100644 (file)
@@ -230,8 +230,8 @@ int clearcut_main(int argc, char *argv[]) {
       printf("Relaxed NJ tree(s) in %s\n", nj_args->outfilename);
     }
   }
-
-  //exit(0);
+  
+       return 0;
 }
 
 
index 287332ad628e33a6a460aee903ba8f7955027c85..7f6e97ed68ebc0d44b1894fe462c5330fd73de3b 100644 (file)
@@ -215,6 +215,8 @@ int ClusterClassic::readPhylipFile(string filename, NameAssignment* nameMap) {
                rabund = new RAbundVector(list->getRAbundVector());
                
                fileHandle.close();
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "ClusterClassic", "readPhylipFile");
index 5998726fe3e4d48523ac6a771a9609dae328f739..0aceb8bc842eb0ee47704f31d8cdb0b6649f9e4a 100644 (file)
@@ -1112,7 +1112,7 @@ int ClusterSplitCommand::createMergedDistanceFile(vector< map<string, string> >
                }
 #endif
                                
-                       
+               return 0;       
                
                
        }
index 3711a1d52c796006a354e3a341e4ba250fd8cf20..a3cebe27ac3a0dec63f8b21b3d1a446864350d28 100644 (file)
@@ -1151,6 +1151,8 @@ bool DistanceCommand::sanityCheck() {
                        remove(outputFile.c_str()); //temp file is bad because file mismatch above
                }
                
+               return good;
+               
        }
        catch(exception& e) {
                m->errorOut(e, "DistanceCommand", "sanityCheck");
index a90bb7e0588baee4f8d922687f99063c8d961387..2b1c802e86b6535dbbca645058f5ac55dd2a22ad 100644 (file)
@@ -181,7 +181,7 @@ string Engine::getCommand()  {
                                
                                if(nextCommand != NULL) {  add_history(nextCommand);  } 
                                else{ //^D causes null string and we want it to quit mothur
-                                       nextCommand = "quit"
+                                       strcpy(nextCommand, "quit")
                                        mout->mothurOut(nextCommand);
                                }       
                                
index 266fc5218f09dc5c935aa8552a85690cfac63bd9..1832f96aed8122020b5ddf0ad5881275e3cc6481 100644 (file)
@@ -587,6 +587,8 @@ int GetGroupsCommand::fillNames(){
                                names.insert(seqs[i]);
                        }
                }
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "GetGroupsCommand", "fillNames");
index ba9a5e7c98093b889c5b2d08c746e3da837bf33f..fd7c8d1d4d7cc22901fc88d5b363176081fa5a14 100644 (file)
@@ -381,7 +381,7 @@ int GetOtusCommand::processList(ListVector*& list, GroupMap*& groupMap, ofstream
                
                m->mothurOut(newList.getLabel() + " - selected " + toString(numOtus) + " of the " + toString(list->getNumBins()) + " OTUs."); m->mothurOutEndLine();
        
-               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "GetOtusCommand", "processList");
index de2a9303e49491384b122cdef6529dacbcc4df5c..6601b09a365774b59ca8752f504fbfb5ab0cd4d3 100644 (file)
@@ -5,13 +5,13 @@
 
 int metastat_main (char* outputFileName, int numRows, int numCols, double threshold, int numPermutations, double** data, int secondGroupingStart){
        
-       int size,c=0,i=0,j=0,k,counter=0, bflag=0; 
+       int size,c=0,i=0,j=0,counter=0, bflag=0; 
        int B=numPermutations;
        int row = numRows;
        int col = numCols;
        int g = secondGroupingStart;
        double thresh=threshold;
-       double placeholder=0,min=0; 
+       double min=0; 
        
        char output[1024];
        strcpy(output, outputFileName);
@@ -24,7 +24,7 @@ int metastat_main (char* outputFileName, int numRows, int numCols, double thresh
        // Initialize the matrices
        size = row*col;
        double matrix[row][col];
-       double pmatrix[size],pmatrix2[size],permuted[size];  
+       double pmatrix[size],permuted[size];  
        double storage[row][9];
        
        for (i=0;i<row;i++){
@@ -343,7 +343,7 @@ void testp(double *permuted_ttests,int *B,double *permuted,
                   *ps) {
        
        double Tvalues[*nr];
-       int a, b, n, i, j,k=0;
+       int a, b, n, j;
        
        a = *B;
        b = *nr;
index 4ec5e1ba7d31495ebef7b5efaf2b7e6bbc82ad7c..11abb9404c7e0ade1df9af56406681ceab65b5c8 100644 (file)
@@ -92,7 +92,6 @@ EstOutput Parsimony::createProcesses(Tree* t, vector< vector<string> > namesOfGr
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
                vector<int> processIDS;
                
                EstOutput results;
index a97e09564d6cbf27d67b57fa461469096237f354..80d909016103f3b579f9096f342cf3a8acbb677b 100644 (file)
@@ -290,7 +290,7 @@ int PhyloDiversityCommand::createProcesses(vector<int>& procIters, Tree* t, map<
        try {
                #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
+               
                vector<int> processIDS;
                map< string, vector<float> >::iterator itSum;
                
index a9a170b86c77dff145079df269fd6b36813848ee..26ae3a83df25e18c8d2d59344b12f0d9c471e401 100644 (file)
@@ -200,7 +200,7 @@ int PhyloSummary::addSeqToTree(string seqName, string seqTaxonomy){
                                for (int k = level; k < maxLevel; k++) {  seqTaxonomy += "unclassified;";   }
                        }
                }
-
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "PhyloSummary", "addSeqToTree");
@@ -310,7 +310,7 @@ int PhyloSummary::addSeqToTree(string seqTaxonomy, vector<string> names){
                                for (int k = level; k < maxLevel; k++) {  seqTaxonomy += "unclassified;";   }
                        }
                }
-               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "PhyloSummary", "addSeqToTree");
index 1fd4e5d238119bbcd6be5c54fbd7013fcdfc27bd..891cca424719d7013a8e2984c1a0032612c464db 100644 (file)
@@ -275,6 +275,8 @@ int PhyloTree::addSeqToTree(string seqName, string seqTaxonomy){
        
                        if (seqTaxonomy == "") {   uniqueTaxonomies[currentNode] = currentNode; }
                }
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "PhyloTree", "addSeqToTree");
index b7ba7d382476ade9782660f4b9127c9c1b55b513..f95b928621215ea6d770031ab712a0a33070c31b 100644 (file)
@@ -525,6 +525,8 @@ int PipelineCommand::runUsersPipeline(){
                }
                
                in.close();
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "PipelineCommand", "runUsersPipeline");
index ec77dd57f2ce811bcac6fa588ee715114eb10f1c..032cd93752db10521d18495aa141888e37720963 100644 (file)
@@ -116,7 +116,7 @@ int Rarefact::createProcesses(vector<int>& procIters, RarefactionCurveData* rcd,
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
+               
                vector<int> processIDS;
                
                EstOutput results;
index 6042bbecebf848b7a37d158293dc7650d2587c51..2c98e814220432e2d27cf82499235a3fe3e928bb 100644 (file)
@@ -588,6 +588,8 @@ int RemoveGroupsCommand::fillNames(){
                                names.insert(seqs[i]);
                        }
                }
+               
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "RemoveGroupsCommand", "fillNames");
index 0e7d302ecc065c00a364dfe8e58b0b6e46750a6a..1a7d3bd8eb5c1a876e6edc6282418dd2d1ce3b30 100644 (file)
@@ -388,6 +388,7 @@ int RemoveOtusCommand::processList(ListVector*& list, GroupMap*& groupMap, ofstr
                
                m->mothurOut(newList.getLabel() + " - removed " + toString(numOtus) + " of the " + toString(list->getNumBins()) + " OTUs."); m->mothurOutEndLine();
                
+               return 0;
                
        }
        catch(exception& e) {
index f9b34298a6fc6eddb364f0148f8c44b3e6900aac..d1732cd0dc37ba3db1edcfdb3835413d3ddaf559 100644 (file)
@@ -1160,7 +1160,6 @@ string ShhherCommand::cluster(string distFileName, string namesFileName){
                double clusterCutoff = cutoff;
                while (matrix->getSmallDist() <= clusterCutoff && matrix->getNNodes() > 0){
                        cluster->update(clusterCutoff);
-                       float dist = matrix->getSmallDist();
                }
                
                list->setLabel(toString(cutoff));
@@ -1411,7 +1410,6 @@ void ShhherCommand::calcCentroidsDriver(int start, int finish){
                                for(int j=0;j<nSeqsPerOTU[i];j++){
                                        int index = cumNumSeqs[i] + j;
                                        int nI = seqIndex[index];
-                                       int nIU = mapSeqToUnique[nI];
                                        
                                        double tauValue = singleTau[seqNumber[index]];
                                        
@@ -1483,7 +1481,6 @@ double ShhherCommand::getNewWeights(){
                        
                        for(int j=0;j<nSeqsPerOTU[i];j++){
                                int index = cumNumSeqs[i] + j;
-                               int nI = seqIndex[index];
                                double tauValue = singleTau[seqNumber[index]];
                                weight[i] += tauValue;
                        }
@@ -1902,7 +1899,6 @@ void ShhherCommand::writeQualities(vector<int> otuCounts){
                vector<vector<int> > qualities(numOTUs);
                vector<double> pr(HOMOPS, 0);
                
-               int index = 0;
                
                for(int i=0;i<numOTUs;i++){
                        int index = 0;
index 1f23ec3aa48202d6516208d643c09b6928da6f47..80f311dc61cbd8d52342ee55d39c2284b161761d 100644 (file)
@@ -66,6 +66,8 @@ int SplitMatrix::splitDistance(){
         
                if (large)      { splitDistanceLarge(); }
                else            { splitDistanceRAM();   }
+               
+               return 0;
                        
        }
        catch(exception& e) {
index ac45d2ff562d0d4f5741901e23549b632073b97b..b8bb7ad44462d64e661d1f9b640fbff87dc872d2 100644 (file)
@@ -521,6 +521,8 @@ int SubSampleCommand::getNames() {
                }
                in.close();     
                
+               return 0;
+               
        }
        catch(exception& e) {
                m->errorOut(e, "SubSampleCommand", "getNames");
@@ -559,6 +561,8 @@ int SubSampleCommand::readNames() {
                }
                in.close();     
                
+               return 0;
+               
        }
        catch(exception& e) {
                m->errorOut(e, "SubSampleCommand", "readNames");
index b3f7729e10a709a202b627148386b7bd66d5ac31..029ca26638830f456179f5595b3fd8300f631c70 100644 (file)
@@ -665,6 +665,7 @@ int SummarySharedCommand::process(vector<SharedRAbundVector*> thisLookup, string
                                        outDist.close();
                                }
                        }
+               return 0;
        }
        catch(exception& e) {
                m->errorOut(e, "SummarySharedCommand", "process");
index b098f8f68559c468b48a1fef4dbd34ecc7504db3..e4d0165d136da966addcf3f235a162cad9f5baa1 100644 (file)
@@ -661,7 +661,6 @@ int TrimFlowsCommand::stripBarcode(Sequence& seq, int& group){
                                oligo = oligo.substr(0,alnLength);
                                temp = temp.substr(0,alnLength);
                                
-                               int newStart=0;
                                int numDiff = countDiffs(oligo, temp);
                                
                                if(numDiff < minDiff){
@@ -959,10 +958,8 @@ vector<unsigned long int> TrimFlowsCommand::getFlowFileBreaks() {
                        m->openInputFile(flowFileName, in);
                        in.seekg(spot);
                        
-                       unsigned long int newSpot = spot;
                        string dummy = m->getline(in);
                        
-                       
                        //there was not another sequence before the end of the file
                        unsigned long int sanityPos = in.tellg();
                        
index 20002049ce986b01f5395ed2b807471cf954133f..d5df4730c9f118966de5f3514b4ec276faffce05 100644 (file)
@@ -455,7 +455,7 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string
        try {
                
                ofstream outFASTA;
-               int able = m->openOutputFile(trimFile, outFASTA);
+               m->openOutputFile(trimFile, outFASTA);
                
                ofstream scrapFASTA;
                m->openOutputFile(scrapFile, scrapFASTA);
@@ -1095,7 +1095,6 @@ int TrimSeqsCommand::stripBarcode(Sequence& seq, QualityScores& qual, int& group
                                oligo = oligo.substr(0,alnLength);
                                temp = temp.substr(0,alnLength);
                                
-                               int newStart=0;
                                int numDiff = countDiffs(oligo, temp);
                                
 //                             cout << oligo << '\t' << temp << '\t' << numDiff << endl;                               
@@ -1220,7 +1219,6 @@ int TrimSeqsCommand::stripForward(Sequence& seq, QualityScores& qual, int& group
                                oligo = oligo.substr(0,alnLength);
                                temp = temp.substr(0,alnLength);
                                
-                               int newStart=0;
                                int numDiff = countDiffs(oligo, temp);
                                
 //                             cout << oligo << '\t' << temp << '\t' << numDiff << endl;                               
index 4ded9c51d399de1bf07950da88e0cb3a19e333d0..b2fd628b42218a38db6b61366ba7374b4ea4603a 100644 (file)
@@ -332,7 +332,6 @@ int UnifracWeightedCommand::createProcesses(Tree* t, vector< vector<string> > na
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
                vector<int> processIDS;
                
                EstOutput results;
index ef9e52188ed32bcea6bf009231bf6c9a0c26ee4a..24b41a1d03317e343e05c65c7516e94778cd557c 100644 (file)
@@ -87,7 +87,6 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
                vector<int> processIDS;
                
                EstOutput results;
@@ -340,7 +339,6 @@ EstOutput Unweighted::createProcesses(Tree* t, vector< vector<string> > namesOfG
        try {
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
                int process = 1;
-               int num = 0;
                vector<int> processIDS;
                
                EstOutput results;
@@ -423,8 +421,6 @@ EstOutput Unweighted::driver(Tree* t, vector< vector<string> > namesOfGroupCombo
                EstOutput results; results.resize(num);
                
                int count = 0;
-               int total = num;
-               int twentyPercent = (total * 0.20);
                int numLeaves = t->getNumLeaves();
                
                Tree* copyTree = new Tree;
index 24adbba9de929382c8bbcaa3efc2272365c73f24..30e4a7682dc4ae4ad840fcdf2f7a31921fc8c351 100644 (file)
@@ -294,9 +294,7 @@ EstOutput Weighted::getValues(Tree* t, string groupA, string groupB) {
                
                        D += weightedSum;
                }
-               
-               int numLeaves = t->getNumLeaves();
-               
+                               
                //calculate u for the group comb 
                for(int i=0;i<t->getNumNodes();i++){