reduce compiler warnings by avoiding to redeclare variables so they shadow others

This commit is contained in:
Axel Kohlmeyer
2021-04-23 15:35:45 -04:00
parent 5a12baeef9
commit 8541b0da3e
18 changed files with 60 additions and 76 deletions

View File

@ -74,14 +74,14 @@ ComputeGlobalAtom::ComputeGlobalAtom(LAMMPS *lmp, int narg, char **arg) :
nvalues = 0;
for (iarg = 0; iarg < nargnew; iarg++) {
ArgInfo argi(arg[iarg]);
ArgInfo argi2(arg[iarg]);
which[nvalues] = argi.get_type();
argindex[nvalues] = argi.get_index1();
ids[nvalues] = argi.copy_name();
which[nvalues] = argi2.get_type();
argindex[nvalues] = argi2.get_index1();
ids[nvalues] = argi2.copy_name();
if ((which[nvalues] == ArgInfo::UNKNOWN) || (which[nvalues] == ArgInfo::NONE)
|| (argi.get_dim() > 1))
|| (argi2.get_dim() > 1))
error->all(FLERR,"Illegal compute slice command");
nvalues++;