initialize cut_respa to NULL in constructor to avoid uninitialized access
This commit is contained in:
@ -47,6 +47,7 @@ PairBornCoulLong::PairBornCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
ewaldflag = pppmflag = 1;
|
||||
ftable = NULL;
|
||||
writedata = 1;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -52,6 +52,7 @@ PairBuckLongCoulLong::PairBuckLongCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
writedata = 1;
|
||||
ftable = NULL;
|
||||
fdisptable = NULL;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -46,6 +46,7 @@ PairCoulLong::PairCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
ewaldflag = pppmflag = 1;
|
||||
ftable = NULL;
|
||||
qdist = 0.0;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -51,6 +51,7 @@ PairLJCharmmCoulLong::PairLJCharmmCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
implicit = 0;
|
||||
mix_flag = ARITHMETIC;
|
||||
writedata = 1;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -55,6 +55,7 @@ PairLJCharmmfswCoulLong::PairLJCharmmfswCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
implicit = 0;
|
||||
mix_flag = ARITHMETIC;
|
||||
writedata = 1;
|
||||
cut_respa = NULL;
|
||||
|
||||
// short-range/long-range flag accessed by DihedralCharmmfsw
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@ PairLJCutCoulLong::PairLJCutCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
writedata = 1;
|
||||
ftable = NULL;
|
||||
qdist = 0.0;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -55,6 +55,7 @@ PairLJLongCoulLong::PairLJLongCoulLong(LAMMPS *lmp) : Pair(lmp)
|
||||
ftable = NULL;
|
||||
fdisptable = NULL;
|
||||
qdist = 0.0;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
||||
@ -55,7 +55,6 @@ class PairCoulStreitz : public Pair {
|
||||
// Kspace parameters
|
||||
int kspacetype;
|
||||
double cut_coul, cut_coulsq;
|
||||
double *cut_respa;
|
||||
double **scale;
|
||||
|
||||
// Wolf
|
||||
|
||||
@ -41,6 +41,7 @@ PairLJ96Cut::PairLJ96Cut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
writedata = 1;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -40,6 +40,7 @@ using namespace MathConst;
|
||||
PairMIECut::PairMIECut(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
respa_enable = 1;
|
||||
cut_respa = NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user