diff --git a/lib/colvars/Makefile.fermi b/lib/colvars/Makefile.fermi index dd13e1b90a..5131af4e82 100644 --- a/lib/colvars/Makefile.fermi +++ b/lib/colvars/Makefile.fermi @@ -8,7 +8,7 @@ EXTRAMAKE = Makefile.lammps.empty CXX = g++ CXXFLAGS = -O2 -mpc64 -march=native -funroll-loops -g \ - -fno-rtti -fno-exceptions # -DCOLVARS_DEBUG + -fno-rtti -fno-exceptions -Wall -Wno-sign-compare # -DCOLVARS_DEBUG ARCHIVE = ar ARCHFLAG = -rscv SHELL = /bin/sh diff --git a/lib/colvars/colvar.cpp b/lib/colvars/colvar.cpp index e07ddbcc5d..8838f55442 100644 --- a/lib/colvars/colvar.cpp +++ b/lib/colvars/colvar.cpp @@ -591,11 +591,12 @@ void colvar::enable (colvar::task const &t) } break; - case task_output_value: case task_runave: case task_corrfunc: case task_ntot: + case task_langevin: + case task_output_energy: break; case task_gradients: @@ -612,6 +613,7 @@ void colvar::enable (colvar::task const &t) build_atom_list(); } break; + } @@ -660,6 +662,9 @@ void colvar::disable (colvar::task const &t) case task_lower_wall: case task_upper_wall: case task_ntot: + case task_langevin: + case task_output_energy: + case task_collect_gradients: break; } diff --git a/lib/colvars/colvaratoms.cpp b/lib/colvars/colvaratoms.cpp index c211168ff2..421d67b08c 100644 --- a/lib/colvars/colvaratoms.cpp +++ b/lib/colvars/colvaratoms.cpp @@ -14,8 +14,8 @@ cvm::atom_group::atom_group (std::string const &conf, char const *key) : b_center (false), b_rotate (false), b_user_defined_fit (false), - ref_pos_group (NULL), b_fit_gradients (false), + ref_pos_group (NULL), noforce (false) { cvm::log ("Defining atom group \""+ @@ -27,7 +27,7 @@ cvm::atom_group::atom_group (std::string const &conf, cvm::atom_group::atom_group (std::vector const &atoms) : b_dummy (false), b_center (false), b_rotate (false), - ref_pos_group (NULL), b_fit_gradients (false), + b_fit_gradients (false), ref_pos_group (NULL), noforce (false) { this->reserve (atoms.size()); @@ -44,7 +44,7 @@ cvm::atom_group::atom_group (std::vector const &atoms) cvm::atom_group::atom_group() : b_dummy (false), b_center (false), b_rotate (false), - ref_pos_group (NULL), b_fit_gradients (false), + b_fit_gradients (false), ref_pos_group (NULL), noforce (false) { total_mass = 0.0; diff --git a/lib/colvars/colvarbias.cpp b/lib/colvars/colvarbias.cpp index 993cb3cd59..18d9f5b964 100644 --- a/lib/colvars/colvarbias.cpp +++ b/lib/colvars/colvarbias.cpp @@ -121,8 +121,8 @@ std::ostream & colvarbias::write_traj (std::ostream &os) colvarbias_harmonic::colvarbias_harmonic (std::string const &conf, char const *key) : colvarbias (conf, key), - target_nsteps (0), - target_nstages (0) + target_nstages (0), + target_nsteps (0) { get_keyval (conf, "forceConstant", force_k, 1.0); for (size_t i = 0; i < colvars.size(); i++) { diff --git a/lib/colvars/colvarbias_meta.cpp b/lib/colvars/colvarbias_meta.cpp index 8e8650e730..cbdd2c20f6 100644 --- a/lib/colvars/colvarbias_meta.cpp +++ b/lib/colvars/colvarbias_meta.cpp @@ -25,16 +25,16 @@ colvarbias_meta::colvarbias_meta() : colvarbias(), - state_file_step (0), - new_hills_begin (hills.end()) + new_hills_begin (hills.end()), + state_file_step (0) { } colvarbias_meta::colvarbias_meta (std::string const &conf, char const *key) : colvarbias (conf, key), - state_file_step (0), - new_hills_begin (hills.end()) + new_hills_begin (hills.end()), + state_file_step (0) { if (cvm::n_abf_biases > 0) cvm::log ("Warning: running ABF and metadynamics together is not recommended unless applyBias is off for ABF.\n"); diff --git a/lib/colvars/colvarcomp.cpp b/lib/colvars/colvarcomp.cpp index 316454e8ef..f509d8fcc3 100644 --- a/lib/colvars/colvarcomp.cpp +++ b/lib/colvars/colvarcomp.cpp @@ -8,18 +8,18 @@ colvar::cvc::cvc() : sup_coeff (1.0), sup_np (1), b_periodic (false), - b_debug_gradients (false), b_inverse_gradients (false), - b_Jacobian_derivative (false) + b_Jacobian_derivative (false), + b_debug_gradients (false) {} colvar::cvc::cvc (std::string const &conf) : sup_coeff (1.0), sup_np (1), b_periodic (false), - b_debug_gradients (false), b_inverse_gradients (false), - b_Jacobian_derivative (false) + b_Jacobian_derivative (false), + b_debug_gradients (false) { if (cvm::debug()) cvm::log ("Initializing cvc base object.\n"); diff --git a/lib/colvars/colvargrid.h b/lib/colvars/colvargrid.h index fd2365da45..1095e0b845 100644 --- a/lib/colvars/colvargrid.h +++ b/lib/colvars/colvargrid.h @@ -173,19 +173,19 @@ public: /// \brief "Almost copy-constructor": only copies configuration /// parameters from another grid, but doesn't reallocate stuff; /// create() must be called after that; - colvar_grid (colvar_grid const &g) : has_data (false), - nd (g.nd), + colvar_grid (colvar_grid const &g) : nd (g.nd), nx (g.nx), mult (g.mult), + data(), cv (g.cv), + actual_value (g.actual_value), lower_boundaries (g.lower_boundaries), upper_boundaries (g.upper_boundaries), + periodic (g.periodic), hard_lower_boundaries (g.hard_lower_boundaries), hard_upper_boundaries (g.hard_upper_boundaries), - periodic (g.periodic), widths (g.widths), - actual_value (g.actual_value), - data() + has_data (false) { save_delimiters = false; } diff --git a/lib/colvars/colvarparse.cpp b/lib/colvars/colvarparse.cpp index 2e62072f34..5ccaf98294 100644 --- a/lib/colvars/colvarparse.cpp +++ b/lib/colvars/colvarparse.cpp @@ -595,7 +595,7 @@ std::istream & operator>> (std::istream &is, colvarparse::read_block const &rb) size_t brace_count = 1; std::string line; while (colvarparse::getline_nocomments (is, line)) { - size_t br = 0, br_old; + size_t br = 0, br_old = 0; while ( (br = line.find_first_of ("{}", br)) != std::string::npos) { if (line[br] == '{') brace_count++; if (line[br] == '}') brace_count--;