Skip to content

Commit

Permalink
Fix compiler warnings identified by Clang 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
speth authored and ischoegl committed Sep 29, 2022
1 parent cbeaf0c commit 332bb9b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/equil/vcs_solve.cpp
Expand Up @@ -1326,10 +1326,8 @@ double VCS_SOLVE::vcs_phaseStabilityTest(const size_t iph)
}

// Now possibly dampen the estimate.
double sumADel = 0.0;
for (size_t k = 0; k < nsp; k++) {
delFrac[k] = fracDelta_raw[k] - fracDelta_old[k];
sumADel += fabs(delFrac[k]);
}
normUpdate = vcs_l2norm(delFrac);

Expand Down
2 changes: 0 additions & 2 deletions src/equil/vcs_solve_TP.cpp
Expand Up @@ -2962,7 +2962,6 @@ double VCS_SOLVE::vcs_tmoles()

void VCS_SOLVE::check_tmoles() const
{
double sum = 0.0;
for (size_t i = 0; i < m_numPhases; i++) {
double m_tPhaseMoles_old_a = TPhInertMoles[i];

Expand All @@ -2971,7 +2970,6 @@ void VCS_SOLVE::check_tmoles() const
m_tPhaseMoles_old_a += m_molNumSpecies_old[k];
}
}
sum += m_tPhaseMoles_old_a;

double denom = m_tPhaseMoles_old[i]+ m_tPhaseMoles_old_a + 1.0E-19;
if (!vcs_doubleEqual(m_tPhaseMoles_old[i]/denom, m_tPhaseMoles_old_a/denom)) {
Expand Down
2 changes: 0 additions & 2 deletions src/oneD/IonFlow.cpp
Expand Up @@ -151,11 +151,9 @@ void IonFlow::electricFieldMethod(const double* x, size_t j0, size_t j1)
double dz = z(j+1) - z(j);

// mixture-average diffusion
double sum = 0.0;
for (size_t k = 0; k < m_nsp; k++) {
m_flux(k,j) = m_wt[k]*(rho*m_diff[k+m_nsp*j]/wtm);
m_flux(k,j) *= (X(x,k,j) - X(x,k,j+1))/dz;
sum -= m_flux(k,j);
}

// ambipolar diffusion
Expand Down

0 comments on commit 332bb9b

Please sign in to comment.