My compiler (gcc 4.8.2, -Wall -Wextra, LAMMPS: 6a587c11c6698) gives a
warning:
../atom.cpp:372:18: warning: suggest parentheses around assignment
used as truth value [-Wparentheses]
if (sflag = 1) sprintf(estyle,"%s/%s",style,lmp->suffix);
Should not it be:
diff --git a/src/atom.cpp b/src/atom.cpp
index 550b959..006538b 100644
--- a/src/atom.cpp
+++ b/src/atom.cpp
@@ -369,7 +369,7 @@ void Atom::create_avec(const char *style, int
narg, char **arg, int trysuffix)
if (sflag) {
char estyle[256];
- if (sflag = 1) sprintf(estyle,"%s/%s",style,lmp->suffix);
+ if (sflag == 1) sprintf(estyle,"%s/%s",style,lmp->suffix);
else sprintf(estyle,"%s/%s",style,lmp->suffix2);
int n = strlen(estyle) + 1;
atom_style = new char[n];