silence compiler warnings
This commit is contained in:
@ -554,7 +554,7 @@ void PairADP::read_file(char *filename)
|
||||
ValueTokenizer values = reader.next_values(1);
|
||||
file->nelements = values.next_int();
|
||||
|
||||
if (values.count() != file->nelements + 1)
|
||||
if ((int)values.count() != file->nelements + 1)
|
||||
error->one(FLERR,"Incorrect element names in ADP potential file");
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
||||
@ -3488,7 +3488,7 @@ void PairAIREBO::read_file(char *filename)
|
||||
// global parameters
|
||||
current_section = "global parameters";
|
||||
|
||||
for(int i = 0; i < params.size(); i++) {
|
||||
for(int i = 0; i < (int)params.size(); i++) {
|
||||
*params[i] = reader.next_double();
|
||||
}
|
||||
|
||||
|
||||
@ -312,7 +312,7 @@ double PairComb3::init_one(int i, int j)
|
||||
|
||||
void PairComb3::read_lib()
|
||||
{
|
||||
int i,j,k,l,m;
|
||||
int i,j,k,l;
|
||||
int ii,jj,kk,ll,mm,iii;
|
||||
|
||||
// open library file on proc 0
|
||||
|
||||
@ -469,8 +469,6 @@ void PairEAM::read_file(char *filename)
|
||||
PotentialFileReader reader(lmp, filename, "EAM");
|
||||
|
||||
try {
|
||||
char * line = nullptr;
|
||||
|
||||
reader.skip_line();
|
||||
|
||||
ValueTokenizer values = reader.next_values(2);
|
||||
|
||||
@ -130,7 +130,7 @@ void PairEAMAlloy::read_file(char *filename)
|
||||
ValueTokenizer values = reader.next_values(1);
|
||||
file->nelements = values.next_int();
|
||||
|
||||
if (values.count() != file->nelements + 1)
|
||||
if ((int)values.count() != file->nelements + 1)
|
||||
error->one(FLERR,"Incorrect element names in EAM potential file");
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
||||
@ -518,7 +518,7 @@ void PairEAMCD::read_h_coeff(char *filename)
|
||||
int degree = values.next_int();
|
||||
nhcoeff = degree+1;
|
||||
|
||||
if (values.count() != nhcoeff + 1 || nhcoeff < 1)
|
||||
if ((int)values.count() != nhcoeff + 1 || nhcoeff < 1)
|
||||
error->one(FLERR, "Failed to read h(x) function coefficients in EAM file.");
|
||||
|
||||
hcoeff = new double[nhcoeff];
|
||||
|
||||
@ -122,8 +122,6 @@ void PairEAMFS::read_file(char *filename)
|
||||
PotentialFileReader reader(lmp, filename, "EAM");
|
||||
|
||||
try {
|
||||
char * line = nullptr;
|
||||
|
||||
reader.skip_line();
|
||||
reader.skip_line();
|
||||
reader.skip_line();
|
||||
@ -132,7 +130,7 @@ void PairEAMFS::read_file(char *filename)
|
||||
ValueTokenizer values = reader.next_values(1);
|
||||
file->nelements = values.next_int();
|
||||
|
||||
if (values.count() != file->nelements + 1)
|
||||
if ((int)values.count() != file->nelements + 1)
|
||||
error->one(FLERR,"Incorrect element names in EAM potential file");
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
||||
@ -130,7 +130,7 @@ void PairEAMAlloyOMP::read_file(char *filename)
|
||||
ValueTokenizer values = reader.next_values(1);
|
||||
file->nelements = values.next_int();
|
||||
|
||||
if (values.count() != file->nelements + 1)
|
||||
if ((int)values.count() != file->nelements + 1)
|
||||
error->one(FLERR,"Incorrect element names in EAM potential file");
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
||||
@ -130,7 +130,7 @@ void PairEAMFSOMP::read_file(char *filename)
|
||||
ValueTokenizer values = reader.next_values(1);
|
||||
file->nelements = values.next_int();
|
||||
|
||||
if (values.count() != file->nelements + 1)
|
||||
if ((int)values.count() != file->nelements + 1)
|
||||
error->one(FLERR,"Incorrect element names in EAM potential file");
|
||||
|
||||
file->elements = new char*[file->nelements];
|
||||
|
||||
@ -256,7 +256,6 @@ void Comm::init_exchange()
|
||||
int nfix = modify->nfix;
|
||||
Fix **fix = modify->fix;
|
||||
|
||||
int onefix;
|
||||
maxexchange_fix = 0;
|
||||
for (int i = 0; i < nfix; i++)
|
||||
maxexchange_fix += fix[i]->maxexchange;
|
||||
|
||||
@ -1667,7 +1667,7 @@ int lammps_style_name(void* ptr, char * category, int index, char * buffer, int
|
||||
Info info(lmp);
|
||||
auto styles = info.get_available_styles(category);
|
||||
|
||||
if (index < styles.size()) {
|
||||
if (index < (int)styles.size()) {
|
||||
strncpy(buffer, styles[index].c_str(), max_size);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ TableFileReader::~TableFileReader() {
|
||||
|
||||
char * TableFileReader::find_section_start(const std::string & keyword) {
|
||||
char * line = nullptr;
|
||||
while (line = reader->next_line()) {
|
||||
while ((line = reader->next_line())) {
|
||||
ValueTokenizer values(line);
|
||||
std::string word = values.next_string();
|
||||
|
||||
|
||||
@ -498,7 +498,7 @@ std::string utils::get_potential_date(const std::string & path, const std::strin
|
||||
reader.ignore_comments = false;
|
||||
char * line = nullptr;
|
||||
|
||||
while (line = reader.next_line()) {
|
||||
while ((line = reader.next_line())) {
|
||||
ValueTokenizer values(line);
|
||||
while (values.has_next()) {
|
||||
std::string word = values.next_string();
|
||||
|
||||
Reference in New Issue
Block a user