update colvars library to produce no more warnings with g++ -Wall
This commit is contained in:
@ -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
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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<cvm::atom> 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<cvm::atom> 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;
|
||||
|
||||
@ -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++) {
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -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<T> const &g) : has_data (false),
|
||||
nd (g.nd),
|
||||
colvar_grid (colvar_grid<T> 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;
|
||||
}
|
||||
|
||||
@ -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--;
|
||||
|
||||
Reference in New Issue
Block a user