From a01032cd2d19b2484cb55d8400acbf0a32ae957c Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 29 Oct 2016 12:02:14 -0400 Subject: [PATCH] Resolve some compiler warnings --- src/equil/vcs_rxnadj.cpp | 2 +- src/kinetics/Reaction.cpp | 2 +- src/numerics/RootFind.cpp | 2 +- src/thermo/RedlichKisterVPSSTP.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/equil/vcs_rxnadj.cpp b/src/equil/vcs_rxnadj.cpp index e3899395a..d040e895b 100644 --- a/src/equil/vcs_rxnadj.cpp +++ b/src/equil/vcs_rxnadj.cpp @@ -379,7 +379,7 @@ int VCS_SOLVE::vcs_rxn_adj_cg() // single species phases will disappear. The sign of DG(I) will // indicate which way the reaction will go. Then, we need to // follow the reaction to see which species will zero out first. - size_t k; + size_t k = npos; double dss; if (m_deltaGRxn_new[irxn] > 0.0) { dss = m_molNumSpecies_old[kspec]; diff --git a/src/kinetics/Reaction.cpp b/src/kinetics/Reaction.cpp index 8d6c919ef..0410a1dcf 100644 --- a/src/kinetics/Reaction.cpp +++ b/src/kinetics/Reaction.cpp @@ -205,7 +205,7 @@ ChemicallyActivatedReaction::ChemicallyActivatedReaction( const Composition& reactants_, const Composition& products_, const Arrhenius& low_rate_, const Arrhenius& high_rate_, const ThirdBody& tbody) - : FalloffReaction(reactants_, products_, low_rate, high_rate, tbody) + : FalloffReaction(reactants_, products_, low_rate_, high_rate_, tbody) { reaction_type = CHEMACT_RXN; } diff --git a/src/numerics/RootFind.cpp b/src/numerics/RootFind.cpp index db206b1b5..8fcf5f291 100644 --- a/src/numerics/RootFind.cpp +++ b/src/numerics/RootFind.cpp @@ -172,7 +172,7 @@ int RootFind::solve(doublereal xmin, doublereal xmax, int itmax, doublereal& fun int topBump = 0; FILE* fp = 0; int doFinalFuncCall = 0; - doublereal x1, x2, xnew, f1, f2, fnew, slope; + doublereal x1, x2, xnew, f1, f2, fnew, slope = 0; doublereal deltaX2 = 0.0, deltaXnew = 0.0; int posStraddle = 0; int retn = ROOTFIND_FAILEDCONVERGENCE; diff --git a/src/thermo/RedlichKisterVPSSTP.cpp b/src/thermo/RedlichKisterVPSSTP.cpp index 7f8f81a97..27d7d02c9 100644 --- a/src/thermo/RedlichKisterVPSSTP.cpp +++ b/src/thermo/RedlichKisterVPSSTP.cpp @@ -613,7 +613,7 @@ void RedlichKisterVPSSTP::Vint(double& VintOut, double& voltsOut) { warn_deprecated("RedlichKisterVPSSTP::Vint", "To be removed after Cantera 2.3."); - double XA; + double XA = 0; doublereal T = temperature(); double Volts = 0.0; lnActCoeff_Scaled_.assign(m_kk, 0.0);