diff --git a/src/molecule.cpp b/src/molecule.cpp index b0fec4bcbc..ff209fda21 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -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) {