diff --git a/src/ActionWithDistribution.cpp b/src/ActionWithDistribution.cpp index 2fedc367aec2c98898cbcf1ca9ac1b2941dcf2c7..e158da78cabf165ce12bdc425e2015778d4c1bd4 100644 --- a/src/ActionWithDistribution.cpp +++ b/src/ActionWithDistribution.cpp @@ -129,6 +129,7 @@ Vessel* ActionWithDistribution::getVessel( const std::string& name ){ } } error("there is no vessel with name " + name); + return NULL; } void ActionWithDistribution::calculateAllVessels( const int& stepn ){ diff --git a/src/BiasMetaD.cpp b/src/BiasMetaD.cpp index 06c0e28d63aaf72118f414efcafaf96fa31410dd..f864d61af526498ec125a3e33923041176a1f6eb 100644 --- a/src/BiasMetaD.cpp +++ b/src/BiasMetaD.cpp @@ -122,14 +122,14 @@ private: PlumedOFile hillsOfile_; Grid* BiasGrid_; FILE* gridfile_; + int wgridstride_; + bool grid_; double height0_; double biasf_; double temp_; - double* dp_; int stride_; - int wgridstride_; bool welltemp_; - bool grid_; + double* dp_; int adaptive_; FlexibleBin *flexbin; int mw_n_; diff --git a/src/CLToolMain.cpp b/src/CLToolMain.cpp index 7c9040022c87a643f4202ef31acfac1058d5ece2..fff30417aa941ddee5814c4a5256bd5537344d71 100644 --- a/src/CLToolMain.cpp +++ b/src/CLToolMain.cpp @@ -178,7 +178,7 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,PlumedCommunicator& p " [help|-h|--help] : to print this help\n" " [--has-mpi] : fails if plumed is running with MPI\n" " [--load LIB] : loads a shared object (typically a plugin library)\n" - " [--standalone-executable] : tells plumed not to look for commands implemented as scripts\n"; + " [--standalone-executable] : tells plumed not to look for commands implemented as scripts\n" "Commands:\n"; fprintf(out,"%s",msg.c_str()); for(unsigned j=0;j<availableCxx.size();++j){ diff --git a/src/ColvarAntibetaRMSD.cpp b/src/ColvarAntibetaRMSD.cpp index 8198b1c1e70375b0b8523fc26f594b5b9c08e629..8a10de10e78a7699bd58b24c3464d9951e343c70 100644 --- a/src/ColvarAntibetaRMSD.cpp +++ b/src/ColvarAntibetaRMSD.cpp @@ -112,7 +112,7 @@ s_cutoff(0) backnames[0]="N"; backnames[1]="CA"; backnames[2]="CB"; backnames[3]="C"; backnames[4]="O"; readBackboneAtoms( backnames, chains ); - bool intra_chain, inter_chain; + bool intra_chain(false), inter_chain(false); std::string style; parse("STYLE",style); if( style=="all" ){ intra_chain=true; inter_chain=true; diff --git a/src/FlexibleBin.cpp b/src/FlexibleBin.cpp index 0ad7e3ce3921993820c194af426f4f9a05f861db..064f49b91e2421256ef46aec8844aec016d82457 100644 --- a/src/FlexibleBin.cpp +++ b/src/FlexibleBin.cpp @@ -128,7 +128,6 @@ vector<double> FlexibleBin::getMatrix() const{ /// vector<double> FlexibleBin::getInverseMatrix() const{ unsigned ncv=paction->getNumberOfArguments(); - unsigned dimension=ncv*(ncv+1)/2; Matrix<double> matrix(ncv,ncv); unsigned i,j,k; k=0; diff --git a/src/FlexibleBin.h b/src/FlexibleBin.h index b80a6ea91cf182b881bfdcb99e13e9dffe92733b..da5ef6c146a17dfbdfbdbf5fd94bcb22acd64411 100644 --- a/src/FlexibleBin.h +++ b/src/FlexibleBin.h @@ -31,10 +31,10 @@ class ActionWithArguments; class FlexibleBin{ private: - double sigma; const int type; // this contains all the infos about the CVs including periodicity ActionWithArguments *paction; + double sigma; // variance is the matrix that really matters vector<double> variance; // this is only there diff --git a/src/Grid.cpp b/src/Grid.cpp index b842a473b0c7a7eca734a6ade7069812f644a644..0a19659f264876925f3f1f284f07a39efc661edb 100644 --- a/src/Grid.cpp +++ b/src/Grid.cpp @@ -456,7 +456,7 @@ Grid* Grid::create(FILE* file, bool dosparse, bool dospline, bool doder) vector<double> dx=grid->getDx(); double f,x; while(1){ - int nread; + int nread=0; for(unsigned i=0;i<nvar;++i){nread=fscanf(file,"%1000lf",&x);xx[i]=x+dx[i]/2.0;} if(nread<1){break;} fscanf(file,"%1000lf",&f); diff --git a/src/NeighborList.cpp b/src/NeighborList.cpp index 40f1f57994d439640bb27ddb5ad5828e8db429d3..ebfc18a020905f01c3a3a2195b2e58e5b872d977 100644 --- a/src/NeighborList.cpp +++ b/src/NeighborList.cpp @@ -151,7 +151,7 @@ void NeighborList::setRequestList() { vector<AtomNumber>& NeighborList::getReducedAtomList() { std::vector< pair<unsigned,unsigned> > newneighbors; for(unsigned int i=0;i<size();++i){ - unsigned newindex0,newindex1; + unsigned newindex0=0,newindex1=0; AtomNumber index0=fullatomlist_[neighbors_[i].first]; AtomNumber index1=fullatomlist_[neighbors_[i].second]; for(unsigned j=0;j<requestlist_.size();++j){ diff --git a/src/PlumedMain.cpp b/src/PlumedMain.cpp index 8facfdf86afb5b2f8387bf25beee1f9d919bd4f9..9317d490927837303d47baab4cc238f157072b03 100644 --- a/src/PlumedMain.cpp +++ b/src/PlumedMain.cpp @@ -61,10 +61,10 @@ PlumedMain::PlumedMain(): actionSet(*new ActionSet(*this)), bias(0.0), exchangePatterns(*new(ExchangePatterns)), - novirial(false), restart(false), stopFlag(NULL), - stopNow(false) + stopNow(false), + novirial(false) { log.link(comm); log.setLinePrefix("PLUMED: "); diff --git a/src/RMSD.cpp b/src/RMSD.cpp index 2922fa8bb29e16386f596438f4375314f4343ddc..108ac893e90c14fa78d4287dacfc8ddee8c993a1 100644 --- a/src/RMSD.cpp +++ b/src/RMSD.cpp @@ -30,8 +30,14 @@ using namespace std; using namespace PLMD; -RMSD::RMSD(const RMSD & oldrmsd): log(oldrmsd.log),alignmentMethod(oldrmsd.alignmentMethod),reference(oldrmsd.reference),align(oldrmsd.align),displace(oldrmsd.align),myoptimalalignment(oldrmsd.myoptimalalignment){ -} +RMSD::RMSD(const RMSD & oldrmsd): + alignmentMethod(oldrmsd.alignmentMethod), + reference(oldrmsd.reference), + align(oldrmsd.align), + displace(oldrmsd.align), + myoptimalalignment(oldrmsd.myoptimalalignment), + log(oldrmsd.log) + {} void RMSD::set(const PDB&pdb, string mytype ){ diff --git a/src/Tools.cpp b/src/Tools.cpp index 11190a9e5c2eac16eb92ca1ab2b060faa3968fac..1393b49b5cdde8a11bb54db8f271c67ecb3c453c 100644 --- a/src/Tools.cpp +++ b/src/Tools.cpp @@ -141,7 +141,7 @@ bool Tools::getParsedLine(PlumedIFile& ifile,vector<string> & words){ bool inside=false; int parlevel=0; bool mergenext=false; - while(stat=ifile.getline(line)){ + while((stat=ifile.getline(line))){ trimComments(line); trim(line); if(line.length()==0) continue;