From 4458c366767c5b076c63ff7294d8fcb2024fe1e7 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 12 Dec 2022 09:45:55 -0500 Subject: [PATCH] some more dead code removed that was detected by clang 15 --- src/AMOEBA/amoeba_dispersion.cpp | 2 -- src/compute_fragment_atom.cpp | 4 ---- src/image.cpp | 2 -- src/random_mars.cpp | 11 +---------- 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/AMOEBA/amoeba_dispersion.cpp b/src/AMOEBA/amoeba_dispersion.cpp index b8d2c48022..f3af921d85 100644 --- a/src/AMOEBA/amoeba_dispersion.cpp +++ b/src/AMOEBA/amoeba_dispersion.cpp @@ -18,10 +18,8 @@ #include "atom.h" #include "comm.h" #include "domain.h" -#include "fft3d_wrap.h" #include "math_const.h" #include "math_special.h" -#include "memory.h" #include "neigh_list.h" #include diff --git a/src/compute_fragment_atom.cpp b/src/compute_fragment_atom.cpp index 177b62b5ac..a1fd19d7af 100644 --- a/src/compute_fragment_atom.cpp +++ b/src/compute_fragment_atom.cpp @@ -148,11 +148,7 @@ void ComputeFragmentAtom::compute_peratom() commflag = 1; - int iteration = 0; - while (true) { - iteration++; - comm->forward_comm(this); done = 1; diff --git a/src/image.cpp b/src/image.cpp index 8c503adf92..9587d4ca81 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -981,7 +981,6 @@ void Image::compute_SSAO() double minPeak = -1; double peakLen = 0.0; - int stepsTaken = 1; while ((small > 0 && ind <= end) || (small < 0 && ind >= end)) { if (ind < 0 || ind >= (width*height)) { break; @@ -1001,7 +1000,6 @@ void Image::compute_SSAO() ind += large; err -= 1.0; } - stepsTaken ++; } if (peakLen > 0) { diff --git a/src/random_mars.cpp b/src/random_mars.cpp index fc5418146a..8f1105e0d9 100644 --- a/src/random_mars.cpp +++ b/src/random_mars.cpp @@ -187,7 +187,7 @@ double RanMars::besselexp(double theta, double alpha, double cp) void RanMars::select_subset(bigint ntarget, int nmine, int *mark, int *next) { - int mode,index,oldindex,newvalue,nflip,which,niter; + int mode,index,oldindex,newvalue,nflip,which; int active[2],first[2]; int newactive[2],newfirst[2],newlast[2]; bigint nmark,nflipall; @@ -209,8 +209,6 @@ void RanMars::select_subset(bigint ntarget, int nmine, int *mark, int *next) if (nmine > 0) next[nmine-1] = -1; nmark = 0; - niter = 0; - while (nmark != ntarget) { // choose to ADD or SUBTRACT from current nmark @@ -285,13 +283,6 @@ void RanMars::select_subset(bigint ntarget, int nmine, int *mark, int *next) if (mode == ADD) nmark += nflipall; else if (mode == SUBTRACT) nmark -= nflipall; - - niter++; - - // DEBUG output of stats - - //if (comm->me == 0) printf("%d %ld %ld %g %ld\n", - // niter,nmark,nactiveall,thresh,nflipall); } }