Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some compilation warnings and removed unused source code #94

Merged
merged 9 commits into from
May 31, 2018
3 changes: 2 additions & 1 deletion Base/FileTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ std::string getCwd()
#ifdef WIN32
_getcwd(cwd, FILENAME_MAX);
#else
getcwd(cwd, FILENAME_MAX);
char* unused __attribute__((unused));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are compilers other than GCC supporting __attribute__?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@norihiro-w Thanks. Just removed it and gcc 7.3 still keeps silent after removing.

unused = getcwd(cwd, FILENAME_MAX);
#endif

return cwd;
Expand Down
2 changes: 1 addition & 1 deletion FEM/fem_ele_std.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6778,7 +6778,7 @@ string CFiniteElementStd::Cal_GP_Velocity_DuMux(int* i_ind, CRFProcess* m_pcs, i
{
cout << "The program is canceled because there is a phase used which is not considered yet!"
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
}
Expand Down
3 changes: 2 additions & 1 deletion FEM/files0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ char* ReadString(void)
{
char* s = (char*)malloc(256);
// char *s = new char[256];//CC
scanf(" %s%*[^\n]%*c", s);
int unused __attribute__((unused));
unused = scanf(" %s%*[^\n]%*c", s);
// int a = (int)strlen(s);
// delete[] s;
// s = new char[a+1];//CC
Expand Down
6 changes: 3 additions & 3 deletions FEM/problem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ inline double Problem::MultiPhaseFlow()
{
std::cout << "Error running Eclipse!"
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
}
Expand Down Expand Up @@ -2016,7 +2016,7 @@ inline double Problem::MultiPhaseFlow()
<< "\n";
std::cout << "The run is terminated now ..."
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
FluidProp = MFPGet("GAS");
Expand All @@ -2027,7 +2027,7 @@ inline double Problem::MultiPhaseFlow()
<< "\n";
std::cout << "The run is terminated now ..."
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
}
Expand Down
2 changes: 1 addition & 1 deletion FEM/rf_mfp_new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ double CFluidProperties::GetElementValueFromNodes(long ElementIndex, int GPIndex
<< "\n";
cout << "The run is terminated now ..."
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}

Expand Down
6 changes: 3 additions & 3 deletions FEM/rf_pcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15270,7 +15270,7 @@ void CRFProcess::CalculateFluidDensitiesAndViscositiesAtNodes(CRFProcess* m_pcs)
{
cout << "Density calculation of water was not possible"
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
// calculate new moles of H2O
Expand Down Expand Up @@ -15353,7 +15353,7 @@ void CRFProcess::CalculateFluidDensitiesAndViscositiesAtNodes(CRFProcess* m_pcs)
{
cout << "Density calculation of gas was not possible"
<< "\n";
system("Pause");
//system("Pause");
exit(0);
}
// set new density to nodes
Expand Down Expand Up @@ -15695,7 +15695,7 @@ void CRFProcess::Phase_Transition_CO2(CRFProcess* m_pcs, int Step)
cout << "The volume is not equal before and after the calculation of CO2 phase transition! "
<< "\n";
cout << "Before: " << Volume_eff << " After: " << gas.volume + liquid.volume << "\n";
system("Pause");
//system("Pause");
exit(0);
}

Expand Down