From 523978b4c7d536cff704e599b51b2a94868f7e9c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 23 Feb 2018 12:04:15 +0100 Subject: [PATCH] dead code and uninitialized variables detected by clang --- src/USER-MISC/pair_edip_multi.cpp | 2 +- src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp index d52b2e4a47..3345549ae3 100644 --- a/src/USER-MISC/pair_edip_multi.cpp +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -364,7 +364,7 @@ void PairEDIPMulti::edip_fc(double r, Param *param, double &f, double &fdr) double c = param->cutoffC; double alpha = param->alpha; double x; - double v1, v2, v3; + double v1, v2; if(r < c + 1E-6) { diff --git a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp index c6490b0824..60445d2d86 100644 --- a/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_long_tip4p_long_omp.cpp @@ -1700,6 +1700,7 @@ void PairLJLongTIP4PLongOMP::eval_outer(int iifrom, int iito, ThrData * const th jnum = numneigh[i]; offseti = offset[itype]; lj1i = lj1[itype]; lj2i = lj2[itype]; lj3i = lj3[itype]; lj4i = lj4[itype]; + fxtmp = fytmp = fztmp = 0.0; for (jj = 0; jj < jnum; jj++) { j = jlist[jj];