silence compiler warning on windows

This commit is contained in:
Axel Kohlmeyer
2021-10-06 16:41:29 -04:00
parent f643c2b98f
commit aab3e085a2
7 changed files with 14 additions and 9 deletions

View File

@ -593,7 +593,7 @@ void PairPolymorphic::read_file(char *file)
if ((ng == 0) || (nr == 0) || (nx == 0))
error->one(FLERR,"Error reading potential file header");
} catch (TokenizerException &e) {
} catch (TokenizerException &) {
error->one(FLERR,"Potential file incompatible with this pair style version");
}

View File

@ -412,7 +412,7 @@ void AngleTable::read_table(Table *tb, char *file, char *keyword)
tb->afile[i] = values.next_double();
tb->efile[i] = values.next_double();
tb->ffile[i] = values.next_double();
} catch (TokenizerException &e) {
} catch (TokenizerException &) {
++cerror;
}
}

View File

@ -340,7 +340,7 @@ void BondTable::read_table(Table *tb, char *file, char *keyword)
tb->rfile[i] = values.next_double();
tb->efile[i] = values.next_double();
tb->ffile[i] = values.next_double();
} catch (TokenizerException &e) {
} catch (TokenizerException &) {
++cerror;
}

View File

@ -58,7 +58,8 @@ void Error::universe_all(const std::string &file, int line, const std::string &s
std::string mesg = "ERROR: " + str;
try {
mesg += fmt::format(" ({}:{})\n",truncpath(file),line);
} catch (fmt::format_error &e) {
} catch (fmt::format_error &) {
; // do nothing
}
if (universe->me == 0) {
if (universe->uscreen) fputs(mesg.c_str(),universe->uscreen);
@ -147,9 +148,9 @@ void Error::all(const std::string &file, int line, const std::string &str)
std::string mesg = "ERROR: " + str;
if (input && input->line) lastcmd = input->line;
try {
mesg += fmt::format(" ({}:{})\nLast command: {}\n",
truncpath(file),line,lastcmd);
} catch (fmt::format_error &e) {
mesg += fmt::format(" ({}:{})\nLast command: {}\n", truncpath(file),line,lastcmd);
} catch (fmt::format_error &) {
; // do nothing
}
utils::logmesg(lmp,mesg);
}

View File

@ -407,7 +407,7 @@ void PairTable::read_table(Table *tb, char *file, char *keyword)
rfile = values.next_double();
tb->efile[i] = conversion_factor * values.next_double();
tb->ffile[i] = conversion_factor * values.next_double();
} catch (TokenizerException &e) {
} catch (TokenizerException &) {
++cerror;
}

View File

@ -1172,7 +1172,7 @@ double utils::timespec2seconds(const std::string &timespec)
if (!values.has_next()) break;
vals[i] = values.next_int();
}
} catch (TokenizerException &e) {
} catch (TokenizerException &) {
return -1.0;
}

View File

@ -13,6 +13,10 @@
#include <string.h>
#include <ctype.h>
#if defined(_WIN32)
#define strdup(x) _strdup(x)
#endif
static int blank_line(char *line)
{
while (*line != '\0') {