silence compiler warnings

This commit is contained in:
Axel Kohlmeyer
2024-09-06 14:58:42 -04:00
parent 42a7294bc1
commit 8fcdb5c271
4 changed files with 11 additions and 7 deletions

View File

@ -148,8 +148,10 @@ void AngleWrite::command(int narg, char **arg)
FILE *coeffs;
char line[MAXLINE] = {'\0'};
coeffs = fopen(coeffs_file.c_str(), "r");
if (!coeffs)
error->one(FLERR, "Unable to open temporary file {}: {}", coeffs_file, utils::getsyserror());
for (int i = 0; i < atom->nangletypes; ++i) {
fgets(line, MAXLINE, coeffs);
utils::sfgets(FLERR, line, MAXLINE, coeffs, coeffs_file.c_str(), error);
writer->input->one(fmt::format("angle_coeff {}", line));
}
fclose(coeffs);