Skip to content

Commit

Permalink
fix unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
baperry2 committed Nov 1, 2023
1 parent 4a4e81e commit 44db8ca
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Exec/RegTests/TripleFlame/pelelmex_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,15 @@ pelelmex_initdata(
amrex::Array4<amrex::Real> const& /*aux*/,
amrex::GeometryData const& geomdata,
ProbParm const& prob_parm,
pele::physics::PMF::PmfData::DataContainer const* pmf_data)
pele::physics::PMF::PmfData::DataContainer const* /*pmf_data*/)
{
const amrex::Real* prob_lo = geomdata.ProbLo();
const amrex::Real* prob_hi = geomdata.ProbHi();

Check warning on line 59 in Exec/RegTests/TripleFlame/pelelmex_prob.H

View workflow job for this annotation

GitHub Actions / Lint-clang-tidy (EB-OFF)

Value stored to 'prob_hi' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

Check warning on line 59 in Exec/RegTests/TripleFlame/pelelmex_prob.H

View workflow job for this annotation

GitHub Actions / Lint-clang-tidy (EB-OFF)

unused variable 'prob_hi' [-Wunused-variable]

Check warning on line 59 in Exec/RegTests/TripleFlame/pelelmex_prob.H

View workflow job for this annotation

GitHub Actions / Lint-clang-tidy (EB-OFF)

unused variable 'prob_hi' [clang-diagnostic-unused-variable]

Check warning on line 59 in Exec/RegTests/TripleFlame/pelelmex_prob.H

View workflow job for this annotation

GitHub Actions / CPU-CMake (macos-latest, Release)

unused variable 'prob_hi' [-Wunused-variable]
const amrex::Real* dx = geomdata.CellSize();

AMREX_D_TERM(const amrex::Real x = prob_lo[0] + (i + 0.5) * dx[0];
, const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];
, const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];);

AMREX_D_TERM(, const amrex::Real L_x = prob_hi[0] - prob_lo[0];
, const amrex::Real L_y = prob_hi[1] - prob_lo[1]);
, const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];,
/*const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];*/);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

auto eos = pele::physics::PhysicsType::eos();
amrex::Real massfrac[NUM_SPECIES] = {0.0};
Expand Down Expand Up @@ -128,19 +125,19 @@ bcnormal(
const amrex::Real x[AMREX_SPACEDIM],
const int /*m_nAux*/,
amrex::Real s_ext[NVAR],
const int idir,
const int /*idir*/,
const int sgn,
const amrex::Real time,
amrex::GeometryData const& geomdata,
amrex::GeometryData const& /*geomdata*/,
ProbParm const& prob_parm,
pele::physics::PMF::PmfData::DataContainer const* pmf_data)
pele::physics::PMF::PmfData::DataContainer const* /*pmf_data*/)
{
auto eos = pele::physics::PhysicsType::eos();
amrex::Real massfrac[NUM_SPECIES] = {0.0};

if (sgn == 1) {

if ((prob_parm.FCData.ctrl_active == 0u) || time <= 0.0) {
if ((prob_parm.FCData.ctrl_active == 0U) || time <= 0.0) {
s_ext[VELX] = 0.0;
#if (AMREX_SPACEDIM == 2)
s_ext[VELY] = prob_parm.V_in;
Expand Down

0 comments on commit 44db8ca

Please sign in to comment.