diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index 5e7819c2f4..b3c4aa46f2 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -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<all(FLERR,"Illegal pair_style lj/long/dipole/long command"); } } diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index a7ac66fdd3..a24ee4203c 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -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"); } diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index 8127cbc127..db239041b9 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -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<all(FLERR,"Illegal pair_style buck/long/coul/long command"); } } diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 610fc4e89b..176b2655ac 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -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<all(FLERR,"Illegal pair_style lj/long/coul/long command"); } } diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index c30d55dd68..abc33b90fa 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -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);