diff --git a/src/AMOEBA/pair_amoeba.cpp b/src/AMOEBA/pair_amoeba.cpp index 4cb5c39b61..1bdd36dd94 100644 --- a/src/AMOEBA/pair_amoeba.cpp +++ b/src/AMOEBA/pair_amoeba.cpp @@ -843,7 +843,7 @@ void PairAmoeba::init_style() } else { index[i] = atom->find_custom(names[i], flag, cols); } - std::string err = ""; + std::string err; if (index[i] < 0) err = "was not defined"; else if (flag_check[i] != flag) err = "has the wrong type"; else if (cols_check[i] != cols) err = "has the wrong number of columns"; diff --git a/src/lammps.cpp b/src/lammps.cpp index ef0e95603f..3329cb8d7b 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -150,7 +150,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : if (has_git_info() && ((update_string == " - Development") || (update_string == " - Maintenance"))) update_string += fmt::format(" - {}", git_descriptor()); - external_comm = 0; + external_comm = MPI_COMM_NULL; mdicomm = nullptr; skiprunflag = 0; @@ -807,7 +807,7 @@ LAMMPS::~LAMMPS() noexcept(false) // free a copy of uorig here, so check in universe destructor will still work MPI_Comm copy = universe->uorig; - if (external_comm) MPI_Comm_free(©); + if (external_comm != MPI_COMM_NULL) MPI_Comm_free(©); delete input; delete universe; diff --git a/unittest/formats/test_molecule_file.cpp b/unittest/formats/test_molecule_file.cpp index c798d2f4c2..743a8fbbfa 100644 --- a/unittest/formats/test_molecule_file.cpp +++ b/unittest/formats/test_molecule_file.cpp @@ -147,7 +147,7 @@ protected: fclose(fp); command(fmt::format("molecule {} {} {}", name, file, args)); - platform::unlink(file.c_str()); + platform::unlink(file); } };