From a2edef7c9c3e8b10f72f0d0031129b15392fef39 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Wed, 7 Jun 2017 00:23:53 -0400 Subject: [PATCH] local variable fp in pair style eam/cd was shadowing class member. renamed local variable to fptr --- src/USER-MISC/pair_cdeam.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/USER-MISC/pair_cdeam.cpp b/src/USER-MISC/pair_cdeam.cpp index 91ef598de8..b5607012ce 100644 --- a/src/USER-MISC/pair_cdeam.cpp +++ b/src/USER-MISC/pair_cdeam.cpp @@ -456,11 +456,11 @@ void PairCDEAM::read_h_coeff(char *filename) { if(comm->me == 0) { // Open potential file - FILE *fp; + FILE *fptr; char line[MAXLINE]; char nextline[MAXLINE]; - fp = force->open_potential(filename); - if (fp == NULL) { + fptr = force->open_potential(filename); + if (fptr == NULL) { char str[128]; sprintf(str,"Cannot open EAM potential file %s", filename); error->one(FLERR,str); @@ -468,7 +468,7 @@ void PairCDEAM::read_h_coeff(char *filename) // h coefficients are stored at the end of the file. // Skip to last line of file. - while(fgets(nextline, MAXLINE, fp) != NULL) { + while(fgets(nextline, MAXLINE, fptr) != NULL) { strcpy(line, nextline); } char* ptr = strtok(line, " \t\n\r\f"); @@ -483,7 +483,7 @@ void PairCDEAM::read_h_coeff(char *filename) error->one(FLERR,"Failed to read h(x) function coefficients from EAM file."); // Close the potential file. - fclose(fp); + fclose(fptr); } MPI_Bcast(&nhcoeff, 1, MPI_INT, 0, world); -- GitLab