remove dead code and reduce trivial compiler warnings (clang++)

This commit is contained in:
Axel Kohlmeyer 2017-03-27 14:28:50 -04:00
parent 3dfe4505dd
commit c041727e4f
18 changed files with 34 additions and 49 deletions

View File

@ -131,9 +131,8 @@ void FixWallGranRegion::init()
void FixWallGranRegion::post_force(int vflag)
{
int i,m,nc,iwall;
double rinv,fx,fy,fz,tooclose;
double dx,dy,dz,rsq,meff;
double xc[3],vwall[3];
double vwall[3];
// do not update shear history during setup

View File

@ -72,7 +72,7 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
coords(NULL), imageflags(NULL), idrigid(NULL), idshake(NULL), fixrigid(NULL), fixshake(NULL)
coords(NULL), imageflags(NULL), fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL)
{
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");

View File

@ -964,22 +964,22 @@ void FixCMAP::bc_coeff(double *gs, double *d1gs, double *d2gs, double *d12gs)
// calculate the bicubic interpolation coefficients c_ij
static int wt[16][16] =
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-3, 0, 0, 3, 0, 0, 0, 0,-2, 0, 0,-1, 0, 0, 0, 0,
2, 0, 0,-2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
0, 0, 0, 0,-3, 0, 0, 3, 0, 0, 0, 0,-2, 0, 0,-1,
0, 0, 0, 0, 2, 0, 0,-2, 0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0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 1, 1, 0, 0},
{-6, 6,-6, 6,-3,-3, 3, 3,-4, 4, 2,-2,-2,-2,-1,-1},
{4,-4, 4,-4, 2, 2,-2,-2, 2,-2,-2, 2, 1, 1, 1, 1}
};
int i, j, k, in;

View File

@ -67,11 +67,6 @@ void PairEAMOpt::eval()
double rhor0j,rhor1j,rhor2j,rhor3j;
} fast_alpha_t;
typedef struct {
double frho0,frho1,frho2,frho3,frho4,frho5,frho6;
double _pad[1];
} fast_beta_t;
typedef struct {
double rhor4i,rhor5i,rhor6i;
double rhor4j,rhor5j,rhor6j;

View File

@ -249,7 +249,7 @@ double FixQEqDynamic::compute_eneg()
int FixQEqDynamic::pack_forward_comm(int n, int *list, double *buf,
int pbc_flag, int *pbc)
{
int m;
int m=0;
if( pack_flag == 1 )
for(m = 0; m < n; m++) buf[m] = atom->q[list[m]];

View File

@ -666,7 +666,6 @@ void FixRX::setup_pre_force(int vflag)
int *mask = atom->mask;
int newton_pair = force->newton_pair;
double tmp;
int ii;
if(restartFlag){
restartFlag = 0;

View File

@ -64,7 +64,6 @@ void NPairHalfBinNewtonSSA::build(NeighList *list)
tagint **special = atom->special;
int **nspecial = atom->nspecial;
int nlocal = atom->nlocal;
int nall = nlocal + atom->nghost;
if (includegroup) nlocal = atom->nfirst;
int *ssaAIR = atom->ssaAIR;

View File

@ -640,10 +640,12 @@ double PairLJCutTholeLong::single(int i, int j, int itype, int jtype,
if (j != di_closest){
if (drudetype[i] == CORE_TYPE) dqi = -atom->q[di];
else if (drudetype[i] == DRUDE_TYPE) dqi = atom->q[i];
else dqi = 0.0;
if (drudetype[j] == CORE_TYPE) {
dj = atom->map(drudeid[j]);
dqj = -atom->q[dj];
} else if (drudetype[j] == DRUDE_TYPE) dqj = atom->q[j];
else dqj = 0.0;
asr = ascreen[itype][jtype] * r;
exp_asr = exp(-asr);
dcoul = force->qqrd2e * dqi * dqj / r;

View File

@ -283,9 +283,6 @@ void DumpNC::openfile()
// Fixme! Perform checks if dimensions and variables conform with
// data structure standard.
size_t index[NC_MAX_VAR_DIMS], count[NC_MAX_VAR_DIMS];
double d[1];
if (singlefile_opened) return;
singlefile_opened = 1;
@ -924,7 +921,7 @@ int DumpNC::modify_param(int narg, char **arg)
for (int i = 0; iarg < narg; iarg++, i++) {
int n;
char *suffix;
char *suffix=NULL;
if (!strcmp(arg[iarg],"step")) {
perframe[i].type = THIS_IS_A_BIGINT;

View File

@ -183,7 +183,6 @@ void FixNHAsphereOMP::nh_v_temp()
#pragma omp parallel for default(none) private(i) schedule(static)
#endif
for (i = 0; i < nlocal; i++) {
double buf[3];
if (mask[i] & groupbit) {
temperature->remove_bias(i,&v[i].x);
v[i].x *= factor_eta;

View File

@ -261,7 +261,6 @@ void FixNHOMP::nh_v_press()
#pragma omp parallel for default(none) private(i) schedule(static)
#endif
for (i = 0; i < nlocal; i++) {
double buf[3];
if (mask[i] & groupbit) {
temperature->remove_bias(i,&v[i].x);
v[i].x *= factor0;
@ -374,7 +373,6 @@ void FixNHOMP::nh_v_temp()
#pragma omp parallel for default(none) private(i) schedule(static)
#endif
for (i = 0; i < nlocal; i++) {
double buf[3];
if (mask[i] & groupbit) {
temperature->remove_bias(i,&v[i].x);
v[i].x *= factor_eta;

View File

@ -137,7 +137,6 @@ void FixNHSphereOMP::nh_v_temp()
#pragma omp parallel for default(none) private(i) schedule(static)
#endif
for (i = 0; i < nlocal; i++) {
double buf[3];
if (mask[i] & groupbit) {
temperature->remove_bias(i,&v[i].x);
v[i].x *= factor_eta;

View File

@ -121,7 +121,7 @@ void FixNVTSllodOMP::nh_v_temp()
#pragma omp parallel for default(none) private(i) shared(h_two) schedule(static)
#endif
for (i = 0; i < nlocal; i++) {
double vdelu0,vdelu1,vdelu2,buf[3];
double vdelu0,vdelu1,vdelu2;
if (mask[i] & groupbit) {
vdelu0 = h_two[0]*v[i].x + h_two[5]*v[i].y + h_two[4]*v[i].z;
vdelu1 = h_two[1]*v[i].y + h_two[3]*v[i].z;

View File

@ -1852,9 +1852,7 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
double rikmag,rjlmag,cosjik,cosijl,g,tmp2,tmp3;
double Etmp,pij,tmp,wij,dwij,NconjtmpI,NconjtmpJ;
double Nki,Nlj,dS,lamdajik,lamdaijl,dgdc,dgdN,pji,Nijconj,piRC;
double dcosjikdri[3],dcosijldri[3],dcosjikdrk[3];
double dN2[2],dN3[3];
double dcosijldrj[3],dcosijldrl[3],dcosjikdrj[3],dwjl;
double dN2[2],dN3[3],dwjl;
double Tij,crosskij[3],crosskijmag;
double crossijl[3],crossijlmag,omkijl;
double tmppij,tmppji,dN2PIJ[2],dN2PJI[2],dN3piRC[3],dN3Tij[3];
@ -1864,16 +1862,16 @@ double PairAIREBOOMP::bondorderLJ_thr(int i, int j, double rij[3], double rijmag
double rlnmag,dwln,r23[3],r23mag,r21[3],r21mag;
double w21,dw21,r34[3],r34mag,cos234,w34,dw34;
double cross321[3],cross234[3],prefactor,SpN;
double fcijpc,fcikpc,fcjlpc,fcjkpc,fcilpc;
double dt2dik[3],dt2djl[3],dt2dij[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
double fcikpc,fcjlpc,fcjkpc,fcilpc;
double dt2dik[3],dt2djl[3],aa,aaa1,aaa2,at2,cw,cwnum,cwnom;
double sin321,sin234,rr,rijrik,rijrjl,rjk2,rik2,ril2,rjl2;
double dctik,dctjk,dctjl,dctij,dctji,dctil,rik2i,rjl2i,sink2i,sinl2i;
double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil,dt1dij;
double dctik,dctjk,dctjl,dctil,rik2i,rjl2i,sink2i,sinl2i;
double rjk[3],ril[3],dt1dik,dt1djk,dt1djl,dt1dil;
double dNlj;
double PijS,PjiS;
double rij2,tspjik,dtsjik,tspijl,dtsijl,costmp;
int *REBO_neighs,*REBO_neighs_i,*REBO_neighs_j,*REBO_neighs_k,*REBO_neighs_l;
double F12[3],F23[3],F34[3],F31[3],F24[3];
double F12[3],F34[3],F31[3],F24[3];
double fi[3],fj[3],fk[3],fl[3],f1[3],f2[3],f3[3],f4[4];
double rji[3],rki[3],rlj[3],r13[3],r43[3];
double realrij[3], realrijmag;

View File

@ -3561,7 +3561,7 @@ int PairSMTBQ::Tokenize( char* s, char*** tok )
void PairSMTBQ::CheckEnergyVSForce()
{
double drL,iq,jq,rsq,evdwlCoul,fpairCoul,eflag,ErepR,frepR,fpair,evdwl;
double drL,iq,jq,rsq,evdwlCoul,fpairCoul,eflag=0,ErepR,frepR,fpair,evdwl;
int i,j,iiiMax,iii,iCoord;
int itype,jtype,l,m;
double r,t1,t2,sds,xi,engSurf,fforceSurf;

View File

@ -1449,7 +1449,7 @@ void CommTiled::box_drop_brick(int idim, double *lo, double *hi, int &indexme)
// NOTE: these error messages are internal sanity checks
// should not occur, can be removed at some point
int index,dir;
int index=-1,dir;
if (hi[idim] == sublo[idim]) {
index = myloc[idim] - 1;
dir = -1;

View File

@ -35,7 +35,7 @@ enum{TYPE,RADIUS};
ComputePropertyLocal::ComputePropertyLocal(LAMMPS *lmp, int narg, char **arg) :
Compute(lmp, narg, arg),
indices(NULL), pack_choice(NULL), vlocal(NULL), alocal(NULL)
vlocal(NULL), alocal(NULL), indices(NULL), pack_choice(NULL)
{
if (narg < 4) error->all(FLERR,"Illegal compute property/local command");

View File

@ -954,7 +954,7 @@ void Neighbor::morph_skip()
int i,j,inewton,jnewton;
NeighRequest *irq,*jrq,*nrq;
for (int i = 0; i < nrequest; i++) {
for (i = 0; i < nrequest; i++) {
irq = requests[i];
// only processing skip lists
@ -1053,7 +1053,7 @@ void Neighbor::morph_skip()
void Neighbor::morph_granular()
{
int i,j;
NeighRequest *irq,*jrq,*nrq;
NeighRequest *irq,*jrq;
for (i = 0; i < nrequest; i++) {
irq = requests[i];