From d1a0c040c9f8cb9da218cfe5ae11fea15ac9fcf5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 20 Aug 2017 23:28:13 -0400 Subject: [PATCH] add initializers for nmatch/nwant variables in molecule file parser --- src/molecule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {