Fix compiler warnings

These were mostly related to changes from r2957.
This commit is contained in:
Ray Speth 2014-06-03 16:53:40 +00:00
parent d38e4553ec
commit dbfe428437
7 changed files with 14 additions and 17 deletions

View file

@ -890,7 +890,7 @@ void ChemEquil::equilResidual(thermo_t& s, const vector_fp& x,
if (DEBUG_MODE_ENABLED && ChemEquil_print_lvl > 0 && !m_doResPerturb) {
writelog("Residual: ElFracGoal ElFracCurrent Resid\n");
for (int n = 0; n < m_mm; n++) {
for (size_t n = 0; n < m_mm; n++) {
writelogf(" % -14.7E % -14.7E % -10.5E\n",
elmFracGoal[n], elmFrac[n], resid[n]);
}

View file

@ -176,8 +176,8 @@ void VCS_SOLVE::vcs_switch_elem_pos(size_t ipos, size_t jpos)
if (ipos == jpos) {
return;
}
if (DEBUG_MODE_ENABLED && ipos > (m_numElemConstraints - 1) ||
jpos > (m_numElemConstraints - 1)) {
if (DEBUG_MODE_ENABLED && (ipos > (m_numElemConstraints - 1) ||
jpos > (m_numElemConstraints - 1))) {
plogf("vcs_switch_elem_pos: ifunc = 0: inappropriate args: %d %d\n",
ipos, jpos);
plogendl();

View file

@ -311,7 +311,7 @@ QUAD_BAIL:
if (DEBUG_MODE_ENABLED && printLvl >= 3) {
fprintf(fp,"\n");
print_funcEval(fp, xnew, fnew, its);
fprintf(fp, "%-5d %-5d %-15.5E %-15.5E", its, 0, xnew, fnew);
fprintf(fp, "%-5d %-5d %-15.5E %-15.5E", (int) its, 0, xnew, fnew);
}
if (foundStraddle) {
@ -372,7 +372,7 @@ QUAD_BAIL:
plogf("vcs_root1d success: convergence achieved\n");
}
if (DEBUG_MODE_ENABLED && printLvl >= 3) {
fprintf(fp, " | vcs_root1d success in %d its, fnorm = %g\n", its, fnorm);
fprintf(fp, " | vcs_root1d success in %d its, fnorm = %g\n", (int) its, fnorm);
}
} else {
retn = VCS_FAILED_CONVERGENCE;

View file

@ -4388,8 +4388,8 @@ void VCS_SOLVE::vcs_switch_pos(const bool ifunc, const size_t k1, const size_t k
if (k1 == k2) {
return;
}
if (DEBUG_MODE_ENABLED && k1 > (m_numSpeciesTot - 1) ||
k2 > (m_numSpeciesTot - 1)) {
if (DEBUG_MODE_ENABLED && (k1 >= m_numSpeciesTot ||
k2 >= m_numSpeciesTot)) {
plogf("vcs_switch_pos: ifunc = 0: inappropriate args: %d %d\n",
k1, k2);
}
@ -4457,8 +4457,7 @@ void VCS_SOLVE::vcs_switch_pos(const bool ifunc, const size_t k1, const size_t k
*/
size_t i1 = k1 - m_numComponents;
size_t i2 = k2 - m_numComponents;
if (DEBUG_MODE_ENABLED && i1 > (m_numRxnTot - 1) ||
i2 > (m_numRxnTot - 1)) {
if (DEBUG_MODE_ENABLED && (i1 > m_numRxnTot || i2 >= m_numRxnTot)) {
plogf("switch_pos: ifunc = 1: inappropriate noncomp values: %d %d\n",
i1 , i2);
}

View file

@ -3287,7 +3287,7 @@ int NonlinearSolver::beuler_jac(GeneralMatrix& J, doublereal* const f,
}
m_nJacEval++;
if (DEBUG_MODE_ENABLED) {
for (int ii = 0; ii < neq_; ii++) {
for (size_t ii = 0; ii < neq_; ii++) {
checkFinite(f[ii]);
}
}
@ -3357,7 +3357,7 @@ int NonlinearSolver::beuler_jac(GeneralMatrix& J, doublereal* const f,
if (fabs(dy) < 1.0E-300) {
throw CanteraError("NonlinearSolver::beuler_jac", "dy is equal to zero");
}
for (int ii = 0; ii < neq_; ii++) {
for (size_t ii = 0; ii < neq_; ii++) {
checkFinite(m_wksp[ii]);
}
}
@ -3437,7 +3437,7 @@ int NonlinearSolver::beuler_jac(GeneralMatrix& J, doublereal* const f,
if (fabs(dy) < 1.0E-300) {
throw CanteraError("NonlinearSolver::beuler_jac", "dy is equal to zero");
}
for (int ii = 0; ii < neq_; ii++) {
for (size_t ii = 0; ii < neq_; ii++) {
checkFinite(m_wksp[ii]);
}
}

View file

@ -5153,7 +5153,7 @@ void HMWSoln::calc_thetas(int z1, int z2,
i = abs(z1);
j = abs(z2);
if (DEBUG_MODE_ENABLED && i > 4 || j > 4) {
if (DEBUG_MODE_ENABLED && (i > 4 || j > 4)) {
printf("we shouldn't be here\n");
exit(EXIT_FAILURE);
}

View file

@ -753,18 +753,16 @@ void RedlichKisterVPSSTP::readXMLBinarySpecies(XML_Node& xmLBinarySpecies)
#ifdef DEBUG_MODE
void RedlichKisterVPSSTP::Vint(double& VintOut, double& voltsOut)
{
doublereal XA, XB;
doublereal XA;
doublereal T = temperature();
doublereal RT = GasConstant * T;
double Volts = 0.0;
lnActCoeff_Scaled_.assign(m_kk, 0.0);
for (int i = 0; i < numBinaryInteractions_; i++) {
for (size_t i = 0; i < numBinaryInteractions_; i++) {
size_t iA = m_pSpecies_A_ij[i];
size_t iB = m_pSpecies_B_ij[i];
XA = moleFractions_[iA];
XB = moleFractions_[iB];
if (XA <= 1.0E-14) {
XA = 1.0E-14;
}