fix "implicit fallthrough" warnings

This commit is contained in:
Axel Kohlmeyer 2019-10-14 16:41:12 +02:00
parent 661238f627
commit 4fca2f1f1d
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
5 changed files with 8 additions and 5 deletions

View File

@ -63,10 +63,10 @@ void PairLJLongDipoleLong::options(char **arg, int order)
if (!*arg) error->all(FLERR,"Illegal pair_style lj/long/dipole/long command");
for (i=0; option[i]&&strcmp(arg[0], option[i]); ++i);
switch (i) {
default: error->all(FLERR,"Illegal pair_style lj/long/dipole/long command");
case 0: ewald_order |= 1<<order; break; // set kspace r^-order
case 2: ewald_off |= 1<<order; // turn r^-order off
case 1: break;
default: error->all(FLERR,"Illegal pair_style lj/long/dipole/long command");
}
}

View File

@ -131,6 +131,7 @@ void EwaldDisp::init()
else if (ewald_mix==Pair::ARITHMETIC) { k = 2; break; }
error->all(FLERR,
"Unsupported mixing rule in kspace_style ewald/disp");
break;
default:
error->all(FLERR,"Unsupported order in kspace_style ewald/disp");
}

View File

@ -65,10 +65,10 @@ void PairBuckLongCoulLong::options(char **arg, int order)
if (!*arg) error->all(FLERR,"Illegal pair_style buck/long/coul/long command");
for (i=0; option[i]&&strcmp(arg[0], option[i]); ++i);
switch (i) {
default: error->all(FLERR,"Illegal pair_style buck/long/coul/long command");
case 0: ewald_order |= 1<<order; break;
case 2: ewald_off |= 1<<order;
case 2: ewald_off |= 1<<order; break;
case 1: break;
default: error->all(FLERR,"Illegal pair_style buck/long/coul/long command");
}
}

View File

@ -68,10 +68,10 @@ void PairLJLongCoulLong::options(char **arg, int order)
if (!*arg) error->all(FLERR,"Illegal pair_style lj/long/coul/long command");
for (i=0; option[i]&&strcmp(arg[0], option[i]); ++i);
switch (i) {
default: error->all(FLERR,"Illegal pair_style lj/long/coul/long command");
case 0: ewald_order |= 1<<order; break;
case 2: ewald_off |= 1<<order;
case 2: ewald_off |= 1<<order; break;
case 1: break;
default: error->all(FLERR,"Illegal pair_style lj/long/coul/long command");
}
}

View File

@ -320,6 +320,8 @@ void PPPMDisp::init()
mixflag == 1) && mixflag!= 2) { k = 1; break; }
else if (ewald_mix==Pair::ARITHMETIC && mixflag!=2) { k = 2; break; }
else if (mixflag == 2) { k = 3; break; }
else error->all(FLERR,"Unsupported mixing rule in kspace_style pppm/disp");
break;
default:
sprintf(str, "Unsupported order in kspace_style "
"pppm/disp, pair_style %s", force->pair_style);