Skip to content

Commit

Permalink
fixed warnings on new GCC compiler (8.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioStanke committed Sep 13, 2019
1 parent 78dd3c1 commit a44df67
Show file tree
Hide file tree
Showing 34 changed files with 207 additions and 207 deletions.
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Definitions common to all Makefiles
# This file is included from other Makefiles in the augustus project.
AUGVERSION = 3.3.2
AUGVERSION = 3.3.3

# make this a comment if you get compilation errors about the boost iostreams library
# cannot install this library and do not need to input gzipped input genome files
Expand Down
2 changes: 1 addition & 1 deletion include/extrinsicinfo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public:
try {
ssList += Properties::getProperty("allow_hinted_splicesites");
ssList += ",";
} catch (KeyNotFoundError) {}
} catch (KeyNotFoundError &) {}
SequenceFeatureCollection::initHintedSplicesites(ssList);

if (offset < 0)
Expand Down
2 changes: 1 addition & 1 deletion include/pp_fastBlockSearcher.hh
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ namespace PP {
putSeedsToEntries(forval + aa, false);
if (aab >= 0 && revval >= 0)
putSeedsToEntries(revval + 400*aab, true);
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
aa = aab = -2;
}
nextPattern[0] = nextPattern[1];
Expand Down
14 changes: 7 additions & 7 deletions include/properties.hh
Original file line number Diff line number Diff line change
Expand Up @@ -244,37 +244,37 @@ class Properties{
static void assignProperty(string name, Integer& target) {
try {
target = getIntProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, unsigned& target) {
try {
target = (unsigned) getIntProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, Double& target) {
try {
target = getDoubleProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, double& target) {
try {
target = getdoubleProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, Boolean& target) {
try {
target = getBoolProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, string& target) {
try {
target = getProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}
static void assignProperty(string name, const char*& target) {
try {
target = getProperty(name);
} catch (KeyNotFoundError e) {}
} catch (KeyNotFoundError &e) {}
}


Expand Down
2 changes: 1 addition & 1 deletion include/types.hh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ostream& operator<< (ostream& strm, const Strand s);
#define MODEL_SUBDIR "model/"
#define EXTRINSIC_SUBDIR "extrinsic/"

#define VERSION "3.3.2"
#define VERSION "3.3.3"

#define PREAMBLE "# This output was generated with AUGUSTUS (version " VERSION ").\n\
# AUGUSTUS is a gene prediction tool written by M. Stanke ([email protected]),\n\
Expand Down
4 changes: 2 additions & 2 deletions include/vitmatrix.hh
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ public:
if (substate.undef()) return get(state);
try {
return getSubstates(state).get(substate);
} catch (NoSubmapFoundError) {
} catch (NoSubmapFoundError &) {
return 0;
}
}
Expand Down Expand Up @@ -643,7 +643,7 @@ inline void ViterbiColumnType::getMaxSubstate(int state, SubstateId& substate, D
submap.getMaxSubstate(substate, value);
if (value > mainval)
return;
} catch (NoSubmapFoundError) {}
} catch (NoSubmapFoundError &) {}
substate.set(0); value = mainval;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CXX = g++
# Notes: - "-Wno-sign-compare" eliminates a high number of warnings (see footnote below). Please adopt
# a strict signed-only usage strategy to avoid mistakes since we are not warned about this.
# - The order of object files in $(OBJS) IS IMPORTANT (see lldouble.hh)
CXXFLAGS := -Wall -Wno-sign-compare -Wno-strict-overflow -pedantic -g -ggdb -O3 ${CXXFLAGS}# -DDEBUG -g -ggdb -pg -DDEBUG_STATES
CXXFLAGS := -Wall -Wno-sign-compare -pedantic -g -ggdb -O3 ${CXXFLAGS}# -DDEBUG -g -ggdb -pg -DDEBUG_STATES
ifdef SQLITE
COMPGENEPRED = true
endif
Expand Down
6 changes: 3 additions & 3 deletions src/augustus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ int main( int argc, char* argv[] ){
} catch( ProjectError& err ){
cerr << "\n" << argv[0] << ": ERROR\n\t" << err.getMessage( ) << "\n\n";
errorcode=1;
} catch ( HelpException help ) {
} catch ( HelpException &help ) {
cerr << help.message << endl;
}
if (outputfile.is_open())
Expand Down Expand Up @@ -424,7 +424,7 @@ void predictOnInputSequences(AnnoSequence *seq, NAMGene &namgene, FeatureCollect
cout << "# joint probability of gene structure and sequence in " <<
Properties::getProperty(SPECIES_KEY) << " model: " << curseq->anno->emiProb << endl;
curseq->anno = olda;
} catch (ProjectError e){
} catch (ProjectError &e){
cerr << e.getMessage() << endl << "Error: Could not compute the emission probabilities (--emiprobs)" << endl;
}
}
Expand Down Expand Up @@ -459,7 +459,7 @@ void setParameters(){
} catch (...) {}
try {
checkExAcc = Properties::getBoolProperty("checkExAcc");
} catch (ProjectError e) {
} catch (ProjectError &e) {
cerr << e.getMessage();
}
try {
Expand Down
2 changes: 1 addition & 1 deletion src/codonMSA.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void CodonMSA::readAlignment(string filename){
}
}
// cout << "species name: " << speciesName << "\t rowseq: " << rowseq << endl;
} catch (std::ios_base::failure e) {
} catch (std::ios_base::failure &e) {
throw ProjectError(string("Could not open file ") + filename + ". Make sure this is not a directory.\n");
}
if(aliLen){
Expand Down
4 changes: 2 additions & 2 deletions src/compgenepred.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ void CompGenePred::start(){
throw ProjectError("Is not numeric.");
dd_factors.push_back(pos);
}
} catch (ProjectError e) {
} catch (ProjectError &e) {
throw ProjectError("Format error parsing parameter --/CompPred/dd_factor=" + dd_param_s +".\n" + e.getMessage());
}
bool onlySampling = false;
Expand All @@ -221,7 +221,7 @@ void CompGenePred::start(){
}else{
cout << "# No outfile for logReg parameters specified. Writing parameters to " << Constant::configPath << "/cgp/log_reg_parameters_trained.cfg" << endl;
}
} catch (ProjectError e) {
} catch (ProjectError &e) {
throw ProjectError("For parameter training a reference species must be specified. Use --refSpecies=<SPECIES> and note, that <SPECIES> must be identical to one of the species names provided in the alignment and tree files.");
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/etraining.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main( int argc, char* argv[] ){

try {
Properties::init( argc, argv );
} catch (ProjectError e) {
} catch (ProjectError &e) {
cout << e.getMessage() << endl << endl;
exit(1);
}
Expand Down
44 changes: 22 additions & 22 deletions src/exonmodel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,62 +300,62 @@ void ExonModel::init() {
minwindowcount=3; // see class Smooth in commontrain.hh
try{
verbosity = Properties::getIntProperty("/ExonModel/verbosity");
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
k = Properties::getIntProperty( "/ExonModel/k" );
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
patpseudo = Properties::getDoubleProperty( "/ExonModel/patpseudocount" );
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
exonLenD = Properties::getIntProperty( "/ExonModel/exonlengthD" );
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
slope_of_bandwidth = Properties::getdoubleProperty( "/ExonModel/slope_of_bandwidth");
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
minwindowcount = Properties::getIntProperty( "/ExonModel/minwindowcount");
}catch( ProjectError e) {
}catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
min_exon_length = Properties::getIntProperty( "/ExonModel/minexonlength");
} catch( ProjectError e) {
} catch( ProjectError &e) {
// optional parameter
}
try{
minPatSum = Properties::getIntProperty( "/ExonModel/minPatSum");
} catch( ProjectError e) {
} catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
etorder = Properties::getIntProperty( "/ExonModel/etorder");
} catch( ProjectError e) {
} catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
etpseudocount = Properties::getIntProperty( "/ExonModel/etpseudocount");
} catch( ProjectError e) {
} catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
tis_motif_memory = Properties::getIntProperty( "/ExonModel/tis_motif_memory");
} catch( ProjectError e) {
} catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
tis_motif_radius = Properties::getIntProperty( "/ExonModel/tis_motif_radius");
} catch( ProjectError e) {
} catch( ProjectError &e) {
cerr << e.getMessage();
}
try{
Expand All @@ -364,10 +364,10 @@ void ExonModel::init() {
cout << "Warning: /ExonModel/lenboostE < 0 does not make sense. Will use 0 instead." << endl;
lenboostE = 0.0;
}
} catch( ProjectError e) {}
} catch( ProjectError &e) {}
try{
lenboostL = Properties::getIntProperty( "/ExonModel/lenboostL");
} catch( ProjectError e) {}
} catch( ProjectError &e) {}

trans_init_window = Constant::trans_init_window;

Expand Down Expand Up @@ -1111,7 +1111,7 @@ void ExonModel::viterbiForwardAndSampling(ViterbiMatrixType& viterbi, // matrix
oli.resetPredEnd();
oli.state = getFullStateId(predState, exonScorer->getPredSubstate());
}
} catch(NoSubmapFoundError e) {}
} catch(NoSubmapFoundError &e) {}
}
Double predProb = predVit.get(predState) * transEmiProb;
if (predProb > maxProb) {
Expand All @@ -1138,7 +1138,7 @@ void ExonModel::viterbiForwardAndSampling(ViterbiMatrixType& viterbi, // matrix
optionslist->prepareSampling();
try {
oli = optionslist->sample();
} catch (ProjectError e) {
} catch (ProjectError &e) {
cerr << "Sampling error in exon model. state=" << state << " base=" << base << endl;
throw e;
}
Expand Down Expand Up @@ -1570,7 +1570,7 @@ Double ExonModel::notEndPartEmiProb(int beginOfStart, int right, int frameOfRigh
else
restSeqProb = Pls[right-beginOfStart][mod3(frameOfRight + right - beginOfStart)]
[s2i.rc(sequence + beginOfStart)];
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
// we dont assume anything in this case, take iid uniform distribution on {a,c,g,t}
restSeqProb = pow(Constant::probNinCoding, right-beginOfStart + 1); // 0.25
}
Expand Down Expand Up @@ -1600,7 +1600,7 @@ Double ExonModel::notEndPartEmiProb(int beginOfStart, int right, int frameOfRigh
else // init pattern at right side
restSeqProb = Pls[k-1][mod3(frameOfRight+right-beginOfInitP)]
[Seq2Int(k).rc(sequence + beginOfInitP)];
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
restSeqProb = pow(Constant::probNinCoding, (int) k ); // 0.25
}

Expand Down Expand Up @@ -1946,7 +1946,7 @@ Double ExonModel::seqProb(int left, int right, int frameOfRight) const {
int f = reverse? mod3(frameOfRight+right-curpos) : mod3(frameOfRight-right+curpos);
int pn = reverse? s2i.rc(sequence+curpos) : s2i(sequence+curpos-k);
seqProb *= emiprobs.probs[f][pn];
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
seqProb *= Constant::probNinCoding; // 0.25, 1/4
}
}
Expand All @@ -1963,7 +1963,7 @@ Double ExonModel::seqProb(int left, int right, int frameOfRight) const {
seqProb *= emiprobs.probs[f][pn];
if (inCRFTraining && (countEnd < 0 || (curpos >= countStart && curpos <= countEnd)))
GCemiprobs[gcIdx].addCount(GCemiprobs[gcIdx].getIndex(f,pn));
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
seqProb *= Constant::probNinCoding; // 0.25 1/4
}
}
Expand Down Expand Up @@ -2001,7 +2001,7 @@ Double ExonModel::eTermSeqProb(int left, int right, int frameOfRight) const {
int f = reverse? mod3(frameOfRight+right-curpos) : mod3(frameOfRight-right+curpos);
int pn = reverse? s2i.rc(sequence+curpos) : s2i(sequence+curpos-k);
seqProb *= etemiprobs[f][pn];
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
seqProb *= Constant::probNinCoding; // 0.25, 1/4
}
}
Expand All @@ -2028,7 +2028,7 @@ Double ExonModel::initialSeqProb(int left, int right, int frameOfRight) const {
int f = reverse? mod3(frameOfRight+right-curpos) : mod3(frameOfRight-right+curpos);
int pn = reverse? s2i.rc(sequence+curpos) : s2i(sequence+curpos-k);
seqProb *= initemiprobs[f][pn];
} catch (InvalidNucleotideError e) {
} catch (InvalidNucleotideError &e) {
seqProb *= Constant::probNinCoding; // 0.25, 1/4
}
}
Expand Down
14 changes: 7 additions & 7 deletions src/exontrain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void ExonModel::printProbabilities(int idx, BaseCount *bc, const char* suffix){
*/
ofstrm.close();
}
catch( ProjectError ) {
catch( ProjectError& ) {
if (verbosity)
cout << "Exon model parameters not saved." << endl;
}
Expand Down Expand Up @@ -620,15 +620,15 @@ void ExonModel::processExons( const Gene* gene ){
if( !exon->next ){
try{
processSingleExon( exon );
} catch (ExonModelError e) {
} catch (ExonModelError &e) {
if (verbosity)
cerr << "gene " << gene->geneid << " transcr. " << gene->id << " in sequence " << gene->seqname << ": " << e.getMessage() << endl;
}
}
else{
try{
processInitialExon( exon );
} catch( ExonModelError e ){
} catch( ExonModelError &e ){
if (verbosity)
cerr << "gene " << gene->geneid << " transcr. " << gene->id << " in sequence " << gene->seqname << ": " << e.getMessage() << endl;
}
Expand All @@ -637,15 +637,15 @@ void ExonModel::processExons( const Gene* gene ){
while( exon->next ){
try{
processInternalExon( exon );
} catch( ExonModelError e ){
} catch( ExonModelError &e ){
if (verbosity)
cerr << "gene " << gene->geneid << " transcr. " << gene->id << " in sequence " << gene->seqname << ": " << e.getMessage() << endl;
}
exon = exon->next;
}
try{
processTerminalExon( exon );
} catch( ExonModelError e ){
} catch( ExonModelError &e ){
if (verbosity)
cerr << "gene " << gene->geneid << " transcr. " << gene->id << " in sequence " << gene->seqname << ": " << e.getMessage() << endl;
}
Expand Down Expand Up @@ -805,7 +805,7 @@ void ExonModel::processInternalExon( const State* exon){
cout << "internal etMotif " << mod3(oldwin + length - Constant::dss_start - Constant::et_coding_len) << " " <<fenster << endl;
*/

} catch( ExonModelError e ){
} catch( ExonModelError &e ){
cerr << "ExonModel::processInternalExon: " << e.getMessage() << endl;
throw e;
}
Expand Down Expand Up @@ -890,7 +890,7 @@ void ExonModel::processInnerSequence(const char *begin, const char* end, int mod
else
throw ProjectError("ExonModel::processInnerSequence: invalid model type");
gesbasen[curwin] += gweight;
} catch (InvalidNucleotideError e) {}
} catch (InvalidNucleotideError &e) {}
curwin++;
}
}
Expand Down
Loading

0 comments on commit a44df67

Please sign in to comment.