]> git.donarmstrong.com Git - mothur.git/commitdiff
added stricter compilation requirements and fixed resulting errors
authorwestcott <westcott>
Wed, 8 Jul 2009 17:06:42 +0000 (17:06 +0000)
committerwestcott <westcott>
Wed, 8 Jul 2009 17:06:42 +0000 (17:06 +0000)
Mothur.xcodeproj/project.pbxproj
blastalign.cpp
chimeraseqscommand.cpp
jackknife.cpp
mothur.h
nameassignment.cpp
shen.cpp

index 136b75f8081de9072b40ab718b6f7d732a7c0e12..7959c798a10a0e1745559369e95bbb5d77347f7f 100644 (file)
                                );
                                GCC_OPTIMIZATION_LEVEL = 3;
                                GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+                               GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
-                               GCC_WARN_PEDANTIC = NO;
+                               GCC_WARN_MISSING_PARENTHESES = YES;
+                               GCC_WARN_PEDANTIC = YES;
+                               GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_PARAMETER = NO;
+                               GCC_WARN_UNUSED_VALUE = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
-                               OTHER_CPLUSPLUSFLAGS = "";
+                               OTHER_CPLUSPLUSFLAGS = (
+                                       "-ansi",
+                                       "-pedantic",
+                                       "-wall",
+                               );
                                PREBINDING = NO;
                                SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
                                WARNING_CFLAGS = "";
index 0645fb031f0d2a4e98b4caba5695f30ecd555474..624210f5f977ac505a32119e574561ec7e92dcc2 100644 (file)
@@ -82,13 +82,13 @@ void BlastAlignment::setPairwiseSeqs(){     //      This method call assigns the blast ge
        
        string candidateName, templateName;
        
-       while(d=blastFile.get() != '='){}
+       while((d=blastFile.get()) != '='){}
        blastFile >> candidateName;                                     //      Get the candidate sequence name from flatfile
        
-       while(d=blastFile.get() != '('){}
+       while((d=blastFile.get()) != '('){}
        blastFile >> candidateLength;                           //      Get the candidate sequence length from flatfile
        
-       while(d=blastFile.get()){
+       while((d=blastFile.get())){
                if(d == '>'){
                        blastFile >> templateName;                      //      Get the template sequence name from flatfile
                        break;
@@ -114,10 +114,10 @@ void BlastAlignment::setPairwiseSeqs(){   //      This method call assigns the blast ge
                }
        }
        
-       while(d=blastFile.get() != '='){}
+       while((d=blastFile.get()) != '='){}
        blastFile >> templateLength;                            //      Get the template sequence length from flatfile
                
-       while(d=blastFile.get() != 'Q'){}                       //      Suck up everything else until we get to the start of the alignment
+       while((d=blastFile.get()) != 'Q'){}                     //      Suck up everything else until we get to the start of the alignment
        int queryStart, sbjctStart, queryEnd, sbjctEnd;
        string queryLabel, sbjctLabel, query, sbjct;
 
@@ -127,7 +127,7 @@ void BlastAlignment::setPairwiseSeqs(){     //      This method call assigns the blast ge
        while(queryLabel == "Query:"){
                blastFile >> queryStart >> query >> queryEnd;
                
-               while(d=blastFile.get() != 'S'){};
+               while((d=blastFile.get()) != 'S'){};
                
                blastFile >> sbjctLabel >> sbjctStart >> sbjct >> sbjctEnd;
                
index f19fe11bcb907b86bc67429388fddfaa485601aa..b451721ca8a0d951b8e01ed5b398dd3b94dbe22a 100644 (file)
@@ -352,8 +352,7 @@ void ChimeraSeqsCommand::generatePreferences(vector<SeqMap> left, vector<SeqMap>
                        pref[i].leftParent[1] = "";
                        pref[i].rightParent[1] = "";
                }
-
-//cout << "in generate left.size() = " << left.size() << endl;         
+       
                for (int i = 0; i < left.size(); i++) {
                        
                        SeqMap currentLeft = left[i];    //example i = 3;   currentLeft is a map of 0 to the distance of sequence 3 to sequence 0,
index 1082465756916c6bebca1e74114f6989ed14ac33..35f0910fab36ca781d2f7653461b0ea79771adf4 100644 (file)
@@ -122,7 +122,7 @@ EstOutput Jackknife::getValues(SAbundVector* rank){
                        }
                        ci = 1.96 * sqrt(ci - jack);
                }
-               else if(k=1){
+               else if(k==1){
                        jack = N[1];
                        ci = 1.96*sqrt(variance[1]);
                }else{
index 5d9dc96bc65428391374abb47e3d8c61e114000b..2efdda8bda209ec303dd7e6bc1b8650b5eb65949 100644 (file)
--- a/mothur.h
+++ b/mothur.h
@@ -60,7 +60,7 @@ using namespace std;
 #endif
 
 
-typedef unsigned long long ull;
+typedef unsigned long ull;
 
 struct IntNode {
        int lvalue;
index 3bcf6f9a968762adede9a4bd434320855b1e2398..c31468c36cbd422a5d8aa72a99cbfc02f7abb5ff 100644 (file)
@@ -52,8 +52,8 @@ ListVector NameAssignment::getListVector(void){
 
 void NameAssignment::print(void){
        try {
-               map<string,int>::iterator it = (*this).begin();
-               for(it;it!=(*this).end();it++){
+               map<string,int>::iterator it;
+               for(it = (*this).begin(); it!=(*this).end(); it++){
                        mothurOut(it->first + "\t" + toString(it->second)); mothurOutEndLine();  //prints out keys and values of the map this.
                }
        }
index 2be566caa5232006cc073e9d59798dbbea43915b..0d515eb19487905608c341ddb536e82436a93938 100644 (file)
--- a/shen.cpp
+++ b/shen.cpp
@@ -36,7 +36,7 @@ EstOutput Shen::getValues(SAbundVector* rank){
                errorOut(e, "Shen", "getValues");
                exit(1);
        }
-};
+}
 
 
 /***********************************************************************/