add initializers for nmatch/nwant variables in molecule file parser

This commit is contained in:
Axel Kohlmeyer
2017-08-20 23:28:13 -04:00
parent f5b8f722ee
commit d1a0c040c9

View File

@ -1219,7 +1219,7 @@ void Molecule::shakeflag_read(char *line)
void Molecule::shakeatom_read(char *line)
{
int tmp, nmatch, nwant;
int tmp, nmatch=0, nwant=0;
for (int i = 0; i < natoms; i++) {
readline(line);
if (shake_flag[i] == 1) {
@ -1262,7 +1262,7 @@ void Molecule::shakeatom_read(char *line)
void Molecule::shaketype_read(char *line)
{
int tmp,nmatch,nwant;
int tmp, nmatch=0, nwant=0;
for (int i = 0; i < natoms; i++) {
readline(line);
if (shake_flag[i] == 1) {