various little cleanups to silence compiler warnings

clarify/simplify some code and initialize variables where needed.
also remove dead code and unused class members
This commit is contained in:
Axel Kohlmeyer
2014-04-10 18:21:12 +02:00
parent 5bb50f8841
commit 5fcfc9f575
39 changed files with 94 additions and 119 deletions

View File

@ -895,7 +895,7 @@ void Input::partition()
{
if (narg < 3) error->all(FLERR,"Illegal partition command");
int yesflag;
int yesflag=-1;
if (strcmp(arg[0],"yes") == 0) yesflag = 1;
else if (strcmp(arg[0],"no") == 0) yesflag = 0;
else error->all(FLERR,"Illegal partition command");
@ -1349,7 +1349,7 @@ void Input::neighbor_command()
void Input::newton()
{
int newton_pair,newton_bond;
int newton_pair=1,newton_bond=1;
if (narg == 1) {
if (strcmp(arg[0],"off") == 0) newton_pair = newton_bond = 0;
@ -1366,15 +1366,9 @@ void Input::newton()
force->newton_pair = newton_pair;
if (newton_bond == 0) {
if (domain->box_exist && force->newton_bond == 1)
error->all(FLERR,"Newton bond change after simulation box is defined");
force->newton_bond = 0;
} else {
if (domain->box_exist && force->newton_bond == 0)
error->all(FLERR,"Newton bond change after simulation box is defined");
force->newton_bond = 1;
}
if (domain->box_exist && (newton_bond != force->newton_bond))
error->all(FLERR,"Newton bond change after simulation box is defined");
force->newton_bond = newton_bond;
if (newton_pair || newton_bond) force->newton = 1;
else force->newton = 0;