Detected by the -Wunused-but-set-variable option in the
open-source IntelLLVM (and, in theory, upstream Clang trunk).
There are also false-positive warnings there, so the
compilation log is noisy.
I'm not doing any silencing here, since it will, hopefully, change by
the time of Clang 13 release.
But the variables removed here appear to be genuinely unused.
rvec grid_x1)
{
rvec av, stddev;
rvec grid_x1)
{
rvec av, stddev;
- real vol, bdens0, bdens1;
int d;
if (nboundeddim < DIM)
int d;
if (nboundeddim < DIM)
calc_x_av_stddev(ncg, cgcm, av, stddev);
}
calc_x_av_stddev(ncg, cgcm, av, stddev);
}
for (d = 0; d < DIM; d++)
{
if (d < nboundeddim)
{
grid_x0[d] = (gr0 != nullptr ? (*gr0)[d] : 0);
grid_x1[d] = (gr1 != nullptr ? (*gr1)[d] : box[d][d]);
for (d = 0; d < DIM; d++)
{
if (d < nboundeddim)
{
grid_x0[d] = (gr0 != nullptr ? (*gr0)[d] : 0);
grid_x1[d] = (gr1 != nullptr ? (*gr1)[d] : box[d][d]);
- vol *= (grid_x1[d] - grid_x0[d]);
grid_x1[d] = (*gr1)[d];
bdens1 = (*gr1)[d];
}
grid_x1[d] = (*gr1)[d];
bdens1 = (*gr1)[d];
}
- vol *= (bdens1 - bdens0);
- unsigned int flags = 0;
- int messages = 0;
- bool atomSetChanged = false;
+ int messages = 0;
+ bool atomSetChanged = false;
/* Receive the send count, box and time step from the peer PP node */
MPI_Recv(&cnb, sizeof(cnb), MPI_BYTE, pme_pp->peerRankId, eCommType_CNB, pme_pp->mpi_comm_mysim, MPI_STATUS_IGNORE);
/* Receive the send count, box and time step from the peer PP node */
MPI_Recv(&cnb, sizeof(cnb), MPI_BYTE, pme_pp->peerRankId, eCommType_CNB, pme_pp->mpi_comm_mysim, MPI_STATUS_IGNORE);
- /* We accumulate all received flags */
- flags |= cnb.flags;
-
*step = cnb.step;
if (debug)
*step = cnb.step;
if (debug)
int mol, nat_mol, nr_mol_with_qm_atoms = 0;
gmx_molblock_t* molb;
bool bQMMM;
int mol, nat_mol, nr_mol_with_qm_atoms = 0;
gmx_molblock_t* molb;
bool bQMMM;
- int index_offset = 0;
- int qm_nr = 0;
grpnr = sys->groups.groupNumbers[SimulationAtomGroupType::QuantumMechanics].data();
grpnr = sys->groups.groupNumbers[SimulationAtomGroupType::QuantumMechanics].data();
- index_offset += nat_mol;
const nbnxn_cj_t* l_cj = nbl->cj.data();
const nbnxn_cj_t* l_cj = nbl->cj.data();
for (const nbnxn_ci_t& ciEntry : nbl->ci)
{
const int ish = (ciEntry.shift & NBNXN_CI_SHIFT);
for (const nbnxn_ci_t& ciEntry : nbl->ci)
{
const int ish = (ciEntry.shift & NBNXN_CI_SHIFT);
- ninner += cjind1 - cjind0;
-
/* Add accumulated i-forces to the force array */
real fShiftX = reduceIncr4ReturnSumHsimd(f + scix, fix_S0, fix_S2);
real fShiftY = reduceIncr4ReturnSumHsimd(f + sciy, fiy_S0, fiy_S2);
/* Add accumulated i-forces to the force array */
real fShiftX = reduceIncr4ReturnSumHsimd(f + scix, fix_S0, fix_S2);
real fShiftY = reduceIncr4ReturnSumHsimd(f + sciy, fiy_S0, fiy_S2);
const nbnxn_cj_t* l_cj = nbl->cj.data();
const nbnxn_cj_t* l_cj = nbl->cj.data();
for (const nbnxn_ci_t& ciEntry : nbl->ci)
{
const int ish = (ciEntry.shift & NBNXN_CI_SHIFT);
for (const nbnxn_ci_t& ciEntry : nbl->ci)
{
const int ish = (ciEntry.shift & NBNXN_CI_SHIFT);
- ninner += cjind1 - cjind0;
-
/* Add accumulated i-forces to the force array */
real fShiftX = reduceIncr4ReturnSum(f + scix, fix_S0, fix_S1, fix_S2, fix_S3);
real fShiftY = reduceIncr4ReturnSum(f + sciy, fiy_S0, fiy_S1, fiy_S2, fiy_S3);
/* Add accumulated i-forces to the force array */
real fShiftX = reduceIncr4ReturnSum(f + scix, fix_S0, fix_S1, fix_S2, fix_S3);
real fShiftY = reduceIncr4ReturnSum(f + sciy, fiy_S0, fiy_S1, fiy_S2, fiy_S3);