diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index c4d53863f7..97a7bc56b3 100755 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -340,7 +340,7 @@ void PairGayBerne::coeff(int narg, char **arg) void PairGayBerne::init_style() { - int irequest = neighbor->request(this); + neighbor->request(this); // per-type shape precalculations // require that atom shapes are identical within each type diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index e862633252..41d964a4e7 100755 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -324,7 +324,7 @@ void PairRESquared::coeff(int narg, char **arg) void PairRESquared::init_style() { - int irequest = neighbor->request(this); + neighbor->request(this); // per-type shape precalculations // require that atom shapes are identical within each type diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index f3a95ae559..c7107077d2 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -251,7 +251,7 @@ void PairLJClass2CoulCut::init_style() if (!atom->q_flag) error->all("Pair style lj/class2/coul/cut requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index 4ef16cbca2..280dacad01 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -260,7 +260,7 @@ void PairLJClass2CoulLong::init_style() if (!atom->q_flag) error->all("Pair style lj/class2/coul/long requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); cut_coulsq = cut_coul * cut_coul; diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 158c7de21c..4975c4f7e2 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -72,7 +72,7 @@ void PairLubricate::compute(int eflag, int vflag) double vt1,vt2,vt3,w1,w2,w3,v_shear1,v_shear2,v_shear3; double omega_t_1,omega_t_2,omega_t_3; double n_cross_omega_t_1,n_cross_omega_t_2,n_cross_omega_t_3; - double wr1,wr2,wr3,wnnr,wn1,wn2,wn3,inv_inertia; + double wr1,wr2,wr3,wnnr,wn1,wn2,wn3; double P_dot_wrel_1,P_dot_wrel_2,P_dot_wrel_3; double a_squeeze,a_shear,a_pump,a_twist; int *ilist,*jlist,*numneigh,**firstneigh; @@ -87,7 +87,6 @@ void PairLubricate::compute(int eflag, int vflag) double **omega = atom->omega; double **torque = atom->torque; double *radius = atom->radius; - double *rmass = atom->rmass; int *type = atom->type; int nlocal = atom->nlocal; int newton_pair = force->newton_pair; @@ -383,7 +382,7 @@ void PairLubricate::init_style() if (comm->ghost_velocity == 0) error->all("Pair lubricate requires ghost atoms store velocity"); - int irequest = neighbor->request(this); + neighbor->request(this); // require that atom radii are identical within each type // require monodisperse system with same radii for all types diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index 1cc83d76c2..5df2ba8b78 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -124,7 +124,7 @@ void PairYukawaColloid::init_style() if (!atom->sphere_flag) error->all("Pair yukawa/colloid requires atom style sphere"); - int irequest = neighbor->request(this); + neighbor->request(this); // require that atom radii are identical within each type diff --git a/src/DIPOLE/pair_dipole_cut.cpp b/src/DIPOLE/pair_dipole_cut.cpp index 5b6ddd8280..3f9e79332e 100644 --- a/src/DIPOLE/pair_dipole_cut.cpp +++ b/src/DIPOLE/pair_dipole_cut.cpp @@ -359,7 +359,7 @@ void PairDipoleCut::init_style() if (!atom->q_flag || !atom->mu_flag || !atom->torque_flag) error->all("Pair dipole/cut requires atom attributes q, mu, torque"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index f418329b48..6713242885 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -239,7 +239,6 @@ void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **f = atom->f; double **tor = atom->torque; int *type = atom->type; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index ba3cbbd3c8..108b108125 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -184,7 +184,6 @@ void PairLJ96CutGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **x = atom->x; double **f = atom->f; int *type = atom->type; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index eadc6fd22f..f66319d66d 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -238,7 +238,6 @@ void PairLJCharmmCoulLongGPU::cpu_compute(int start, int inum, int eflag, double **f = atom->f; double *q = atom->q; int *type = atom->type; - int nlocal = atom->nlocal; double *special_coul = force->special_coul; double *special_lj = force->special_lj; double qqrd2e = force->qqrd2e; diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 4406eac3c7..6441f05419 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -202,7 +202,7 @@ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag, int vflag, int *ilist, int *numneigh, int **firstneigh) { - int i,j,ii,jj,jnum,itype,jtype,itable; + int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; double rsq,r,rinv,r2inv,r3inv,r6inv,forcecoul,forcelj; double grij,expm2,prefactor,t,erfc; @@ -215,7 +215,6 @@ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag, double **f = atom->f; double *q = atom->q; int *type = atom->type; - int nlocal = atom->nlocal; double *special_coul = force->special_coul; double *special_lj = force->special_lj; double qqrd2e = force->qqrd2e; diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index c3ba2b4400..f351c7ab97 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -181,7 +181,6 @@ void PairLJClass2GPU::cpu_compute(int start, int inum, int eflag, int vflag, double **x = atom->x; double **f = atom->f; int *type = atom->type; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index 3ecaec8660..791e47410e 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -197,10 +197,8 @@ void PairLJCutCoulCutGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **f = atom->f; double *q = atom->q; int *type = atom->type; - int nlocal = atom->nlocal; double *special_coul = force->special_coul; double *special_lj = force->special_lj; - int newton_pair = force->newton_pair; double qqrd2e = force->qqrd2e; // loop over neighbors of my atoms diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index dcf3645dd6..ad0414e6bb 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -223,7 +223,6 @@ void PairLJCutCoulLongGPU::cpu_compute(int start, int inum, int eflag, double **f = atom->f; double *q = atom->q; int *type = atom->type; - int nlocal = atom->nlocal; double *special_coul = force->special_coul; double *special_lj = force->special_lj; double qqrd2e = force->qqrd2e; diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index bb81129762..c37ce7bd56 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -183,7 +183,6 @@ void PairLJCutGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **x = atom->x; double **f = atom->f; int *type = atom->type; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index b4c50d55c4..fc0c8812a3 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -184,8 +184,6 @@ void PairLJExpandGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **x = atom->x; double **f = atom->f; int *type = atom->type; - int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index 711359a300..a0d6be917b 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -181,8 +181,6 @@ void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **x = atom->x; double **f = atom->f; int *type = atom->type; - int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 87bdd220fb..3d9a5b9f9a 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -234,7 +234,6 @@ void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag, double **f = atom->f; double **tor = atom->torque; int *type = atom->type; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; // loop over neighbors of my atoms diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index 79b072e442..fce0ce0846 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -355,7 +355,7 @@ void PairBornCoulLong::init_style() error->all("Pair style is incompatible with KSpace style"); g_ewald = force->kspace->g_ewald; - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index f8ba6a3501..ba18aff25e 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -332,7 +332,7 @@ void PairBuckCoulLong::init_style() error->all("Pair style is incompatible with KSpace style"); g_ewald = force->kspace->g_ewald; - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index fd8d90b3f7..dee833cb66 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -235,12 +235,10 @@ void PairCoulLong::coeff(int narg, char **arg) void PairCoulLong::init_style() { - int i,j; - if (!atom->q_flag) error->all("Pair style lj/cut/coul/long requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); cut_coulsq = cut_coul * cut_coul; diff --git a/src/MAKE/Makefile.g++ b/src/MAKE/Makefile.g++ index 6b98a5c451..20e03cd8e6 100755 --- a/src/MAKE/Makefile.g++ +++ b/src/MAKE/Makefile.g++ @@ -7,7 +7,7 @@ SHELL = /bin/sh # specify flags and libraries needed for your compiler CC = g++4 -CCFLAGS = -g -O +CCFLAGS = -g -O # -Wunused DEPFLAGS = -M LINK = g++4 LINKFLAGS = -g -O diff --git a/src/MANYBODY/pair_adp.cpp b/src/MANYBODY/pair_adp.cpp index 0536c93a32..c2823c73e8 100644 --- a/src/MANYBODY/pair_adp.cpp +++ b/src/MANYBODY/pair_adp.cpp @@ -127,8 +127,7 @@ void PairADP::compute(int eflag, int vflag) double *coeff; int *ilist,*jlist,*numneigh,**firstneigh; double delmux,delmuy,delmuz,trdelmu,tradellam; - double adpx,adpy,adpz,adpx2,adpy2,adpz2; - double fx,fy,fz; + double adpx,adpy,adpz,fx,fy,fz; double sumlamxx,sumlamyy,sumlamzz,sumlamyz,sumlamxz,sumlamxy; evdwl = 0.0; @@ -512,7 +511,7 @@ void PairADP::init_style() file2array(); array2spline(); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- @@ -575,7 +574,7 @@ void PairADP::read_file(char *filename) char **words = new char*[file->nelements+1]; nwords = 0; - char *first = strtok(line," \t\n\r\f"); + strtok(line," \t\n\r\f"); while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue; file->elements = new char*[file->nelements]; diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index a59331430d..427495433c 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -296,7 +296,7 @@ double PairAIREBO::init_one(int i, int j) void PairAIREBO::REBO_neigh() { - int i,j,ii,jj,m,n,allnum,jnum,itype,jtype; + int i,j,ii,jj,n,allnum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,rsq,dS; int *ilist,*jlist,*numneigh,**firstneigh; int *neighptr; diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 4e26b70227..4b203731fd 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -114,7 +114,6 @@ void PairComb::compute(int eflag, int vflag) double rsq,rsq1,rsq2; double delr1[3],delr2[3],fi[3],fj[3],fk[3]; double zeta_ij,prefactor; - double fqi,fqij; int *ilist,*jlist,*numneigh,**firstneigh; int mr1,mr2,mr3; int rsc,inty; @@ -143,7 +142,6 @@ void PairComb::compute(int eflag, int vflag) int *type = atom->type; int nlocal = atom->nlocal; int newton_pair = force->newton_pair; - int ntype = atom->ntypes; inum = list->inum; ilist = list->ilist; @@ -429,7 +427,6 @@ void PairComb::settings(int narg, char **arg) void PairComb::coeff(int narg, char **arg) { int i,j,n; - double r; if (!allocated) allocate(); @@ -1224,7 +1221,7 @@ double PairComb::comb_gijk(double costheta, Param *param) return (1.0 + pow(comb_c/comb_d,2.0) - pow(comb_c,2.0) / (pow(comb_d,2.0) + pow(param->h - costheta,2.0))); -}; +} /* ---------------------------------------------------------------------- */ @@ -1346,7 +1343,6 @@ void PairComb::sm_table() double exp2ear,exp2ebr,exp2earsh,exp2ebrsh,fafbsh,dfafbsh; int n = atom->ntypes; - int *type = atom->type; dra = 0.001; // lookup table step size drin = 0.1; // starting distance of 1/r @@ -1498,7 +1494,7 @@ void PairComb::sm_table() void PairComb::potal_calc(double &calc1, double &calc2, double &calc3) { - double potal,alf,rcoul,fac11,fac11e,esucon; + double alf,rcoul,esucon; int m; rcoul = 0.0; @@ -1521,7 +1517,6 @@ void PairComb::tri_point(double rsq, int &mr1, int &mr2, double &sr3, int &itype) { double r, rin, dr, dd, rr1, rridr, rridr2; - int m = itype; rin = 0.10; dr = 0.0010; r = sqrt(rsq); @@ -1552,7 +1547,7 @@ void PairComb::direct(int inty, int mr1, int mr2, int mr3, double rsq, double potal, double fac11, double fac11e, double &pot_tmp, double &pot_d) { - double r,erfcc,fafbn1,potij,sme2,chrij,esucon; + double r,erfcc,fafbn1,potij,sme2,esucon; double r3,erfcd,dfafbn1,smf2,dvdrr,alf,alfdpi; r = sqrt(rsq); @@ -1620,20 +1615,17 @@ void PairComb::field(Param *param, double rsq, double iq,double jq, double PairComb::yasu_char(double *qf_fix, int &igroup) { int i,j,k,ii,jj,kk,jnum; - int itag,jtag,itype,jtype,ktype,iparam_i,iparam_ij,iparam_ijk; - double xtmp,ytmp,ztmp,evdwl,fpair; - double rsq,rsq1,rsq2,delr1[3],delr2[3],zeta_ij; + int itype,jtype,ktype,iparam_i,iparam_ij,iparam_ijk; + double xtmp,ytmp,ztmp; + double rsq1,rsq2,delr1[3],delr2[3],zeta_ij; int *ilist,*jlist,*numneigh,**firstneigh; - double iq,jq,fqi,fqj,fqij,fqjj,ecoul,yaself,yaself_d; + double iq,jq,fqi,fqj,fqij,fqjj; double potal,fac11,fac11e,sr1,sr2,sr3; int mr1,mr2,mr3,inty; - int zeta_flag; double **x = atom->x; double *q = atom->q; - int *tag = atom->tag; int *type = atom->type; - int nlocal = atom->nlocal; int inum = list->inum; ilist = list->ilist; @@ -1931,10 +1923,10 @@ void PairComb::qfo_short(Param *param, double rsq, double zeta_ij, 10.0*QOchj*param->bB2*pow(fabs(QOchj),(10.0-2.0)); if (Asi > 0.0 && Asj > 0.0) caj = 1.0/(2.0*sqrt(Asi*Asj)) * romie; - else caj == 0.0; + else caj = 0.0; if (Bsi > 0.0 && Bsj > 0.0) cbj = 1.0/(2.0*sqrt(Bsi*Bsj)) * romib ; - else cbj == 0.0; + else cbj = 0.0; cfqr = 0.50 * tmp_fc * (1.0 + vrcs); // 0.5 b/c full atom loop cfqs = -0.50 * tmp_fc * bij; diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index 7f8cb5573c..bc87ad4b85 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -398,7 +398,7 @@ void PairEAM::init_style() file2array(); array2spline(); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index 894ab07922..0584022586 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -150,7 +150,7 @@ void PairEAMAlloy::read_file(char *filename) char **words = new char*[file->nelements+1]; nwords = 0; - char *first = strtok(line," \t\n\r\f"); + strtok(line," \t\n\r\f"); while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue; file->elements = new char*[file->nelements]; diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index 332d78f2ce..ccd4d7e30d 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -150,7 +150,7 @@ void PairEAMFS::read_file(char *filename) char **words = new char*[file->nelements+1]; nwords = 0; - char *first = strtok(line," \t\n\r\f"); + strtok(line," \t\n\r\f"); while (words[nwords++] = strtok(NULL," \t\n\r\f")) continue; file->elements = new char*[file->nelements]; diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index aedde6915d..07c2706c06 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -433,7 +433,7 @@ void PairEIM::init_style() file2array(); array2spline(); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index ca7b56b813..5b5f5b6c1b 100755 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -709,7 +709,7 @@ double PairTersoff::ters_gijk(double costheta, Param *param) return param->gamma*(1.0 + pow(ters_c/ters_d,2.0) - pow(ters_c,2.0) / (pow(ters_d,2.0) + pow(param->h - costheta,2.0))); -}; +} /* ---------------------------------------------------------------------- */ @@ -796,4 +796,4 @@ void PairTersoff::costheta_d(double *rij_hat, double rij, vec3_scale(1.0/rik,drk,drk); vec3_add(drj,drk,dri); vec3_scale(-1.0,dri,dri); -}; +} diff --git a/src/MEAM/pair_meam.cpp b/src/MEAM/pair_meam.cpp index bd01b61043..6a1fb1a877 100644 --- a/src/MEAM/pair_meam.cpp +++ b/src/MEAM/pair_meam.cpp @@ -117,9 +117,9 @@ PairMEAM::~PairMEAM() void PairMEAM::compute(int eflag, int vflag) { - int i,j,ii,n,inum_half,itype,jtype,errorflag; + int i,j,ii,n,inum_half,errorflag; double evdwl; - int *ilist_half,*jlist_half,*numneigh_half,**firstneigh_half; + int *ilist_half,*numneigh_half,**firstneigh_half; int *numneigh_full,**firstneigh_full; evdwl = 0.0; @@ -127,8 +127,6 @@ void PairMEAM::compute(int eflag, int vflag) else evflag = vflag_fdotr = eflag_global = vflag_global = eflag_atom = vflag_atom = 0; - int newton_pair = force->newton_pair; - // grow local arrays if necessary if (atom->nmax > nmax) { @@ -819,7 +817,7 @@ void PairMEAM::unpack_comm(int n, int first, double *buf) int PairMEAM::pack_reverse_comm(int n, int first, double *buf) { - int i,k,m,last,size; + int i,k,m,last; m = 0; last = first + n; diff --git a/src/MOLECULE/fix_bond_break.cpp b/src/MOLECULE/fix_bond_break.cpp index 2b9f44e1e6..a4c44338da 100755 --- a/src/MOLECULE/fix_bond_break.cpp +++ b/src/MOLECULE/fix_bond_break.cpp @@ -155,7 +155,7 @@ void FixBondBreak::init() void FixBondBreak::post_integrate() { - int i,j,k,m,n,i1,i2,n1,n3,possible,type; + int i,j,k,m,n,i1,i2,n1,n3,type; double delx,dely,delz,rsq,min,max; int *slist; @@ -277,7 +277,7 @@ void FixBondBreak::post_integrate() // remove J from special bond list for atom I // atom J will also do this - slist = atom->special[i]; + slist = special[i]; n1 = nspecial[i][0]; n3 = nspecial[i][2]; for (m = 0; m < n1; m++) diff --git a/src/MOLECULE/fix_bond_create.cpp b/src/MOLECULE/fix_bond_create.cpp index be7491fe53..295f04981b 100755 --- a/src/MOLECULE/fix_bond_create.cpp +++ b/src/MOLECULE/fix_bond_create.cpp @@ -420,7 +420,7 @@ void FixBondCreate::post_integrate() // add a 1-2 neighbor to special bond list for atom I // atom J will also do this - slist = atom->special[i]; + slist = special[i]; n1 = nspecial[i][0]; n3 = nspecial[i][2]; if (n3 == atom->maxspecial) diff --git a/src/MOLECULE/pair_hbond_dreiding_lj.cpp b/src/MOLECULE/pair_hbond_dreiding_lj.cpp index 4e38939fcb..243e837219 100644 --- a/src/MOLECULE/pair_hbond_dreiding_lj.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_lj.cpp @@ -96,7 +96,6 @@ void PairHbondDreidingLJ::compute(int eflag, int vflag) int **special = atom->special; int *type = atom->type; int **nspecial = atom->nspecial; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; inum = list->inum; @@ -448,7 +447,7 @@ double PairHbondDreidingLJ::single(int i, int j, int itype, int jtype, { int k,kk,ktype,knum,m; double eng,eng_lj,force_kernel,force_angle; - double rsq1,rsq2,r1,r2,c,a,s,ac,r2inv,r10inv,factor_hb; + double rsq1,rsq2,r1,r2,c,s,ac,r2inv,r10inv,factor_hb; double switch1,switch2; double delr1[3],delr2[3]; int *klist; diff --git a/src/MOLECULE/pair_hbond_dreiding_morse.cpp b/src/MOLECULE/pair_hbond_dreiding_morse.cpp index 8eea8b8e64..62f75f0a18 100644 --- a/src/MOLECULE/pair_hbond_dreiding_morse.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_morse.cpp @@ -65,7 +65,6 @@ void PairHbondDreidingMorse::compute(int eflag, int vflag) int **special = atom->special; int *type = atom->type; int **nspecial = atom->nspecial; - int nlocal = atom->nlocal; double *special_lj = force->special_lj; inum = list->inum; @@ -352,7 +351,7 @@ double PairHbondDreidingMorse::single(int i, int j, int itype, int jtype, { int k,kk,ktype,knum,m; double eng,eng_morse,force_kernel,force_angle; - double rsq1,rsq2,r1,r2,c,a,s,ac,r,dr,dexp,factor_hb; + double rsq1,rsq2,r1,r2,c,s,ac,r,dr,dexp,factor_hb; double switch1,switch2; double delr1[3],delr2[3]; int *klist; diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp index 1ba29e8f59..3552f9e18b 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp @@ -287,7 +287,7 @@ void PairLJCharmmCoulCharmm::init_style() if (!atom->q_flag) error->all("Pair style lj/charmm/coul/charmm requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); // require cut_lj_inner < cut_lj, cut_coul_inner < cut_coul diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index 8becf3b860..ec50bdf0ec 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -127,8 +127,6 @@ void PairPeriLPS::compute(int eflag, int vflag) numneigh = list->numneigh; firstneigh = list->firstneigh; - double dt = update->dt; - // loop over neighbors of my atoms // need minimg() for x0 difference since not ghosted @@ -452,7 +450,7 @@ void PairPeriLPS::init_style() if (strcmp(modify->fix[i]->style,"PERI_NEIGH") == 0) ifix_peri = i; if (ifix_peri == -1) error->all("Fix peri neigh does not exist"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index 08eaee0ef0..436745e938 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -389,7 +389,7 @@ void PairPeriPMB::init_style() if (strcmp(modify->fix[i]->style,"PERI_NEIGH") == 0) ifix_peri = i; if (ifix_peri == -1) error->all("Fix peri neigh does not exist"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 8fe57abaa1..47b82dfa28 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -324,7 +324,7 @@ int FixPOEMS::setmask() void FixPOEMS::init() { - int i,j,ibody; + int i,ibody; // warn if more than one POEMS fix @@ -591,7 +591,7 @@ void FixPOEMS::init() void FixPOEMS::setup(int vflag) { - int i,j,n,ibody; + int i,n,ibody; // vcm = velocity of center-of-mass of each rigid body // angmom = angular momentum of each rigid body @@ -708,7 +708,7 @@ void FixPOEMS::initial_integrate(int vflag) void FixPOEMS::post_force(int vflag) { - int i,j,ibody; + int i,ibody; int xbox,ybox,zbox; double dx,dy,dz; @@ -823,8 +823,6 @@ void FixPOEMS::pre_neighbor() {} int FixPOEMS::dof(int igroup) { - int i,j; - int groupbit = group->bitmask[igroup]; // ncount = # of atoms in each rigid body that are also in group @@ -836,7 +834,7 @@ int FixPOEMS::dof(int igroup) int *ncount = new int[nbody]; for (int ibody = 0; ibody < nbody; ibody++) ncount[ibody] = 0; - for (i = 0; i < nlocal; i++) + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (natom2body[i]) ncount[atom2body[i][0]]++; @@ -852,7 +850,7 @@ int FixPOEMS::dof(int igroup) // subtract 3 additional dof for each joint if atom is also in igroup int m = 0; - for (i = 0; i < nlocal; i++) + for (int i = 0; i < nlocal; i++) if (natom2body[i] > 1 && (mask[i] & groupbit)) m += 3*(natom2body[i]-1); int mall; MPI_Allreduce(&m,&mall,1,MPI_INT,MPI_SUM,world); diff --git a/src/REAX/pair_reax.cpp b/src/REAX/pair_reax.cpp index 9ae259ff8c..6e9e3020f0 100644 --- a/src/REAX/pair_reax.cpp +++ b/src/REAX/pair_reax.cpp @@ -265,7 +265,6 @@ void PairREAX::compute(int eflag, int vflag) void PairREAX::write_reax_positions() { - double xtmp, ytmp, ztmp; int j, jx, jy, jz, jia; double **x = atom->x; @@ -312,7 +311,6 @@ void PairREAX::write_reax_vlist() int *ilist,*jlist,*numneigh,**firstneigh; double delr2; double delx, dely, delz; - double rtmp[3]; double **x = atom->x; int *tag = atom->tag; @@ -669,7 +667,7 @@ void PairREAX::unpack_comm(int n, int first, double *buf) int PairREAX::pack_reverse_comm(int n, int first, double *buf) { - int i,k,m,last,size; + int i,m,last; m = 0; last = first + n; @@ -683,7 +681,7 @@ int PairREAX::pack_reverse_comm(int n, int first, double *buf) void PairREAX::unpack_reverse_comm(int n, int *list, double *buf) { - int i,j,k,m; + int i,j,m; m = 0; for (i = 0; i < n; i++) { @@ -753,7 +751,6 @@ void PairREAX::compute_charge(double &energy_charge_equilibration) double qsum,qi; int nmatentries; double sw; - double rtmp[3]; int inum,jnum; int *ilist,*jlist,*numneigh,**firstneigh; @@ -929,9 +926,6 @@ void PairREAX::charge_reax(const int & nlocal, const int & nghost, double ch[], double aval[], int acol_ind[], int arow_ptr[], double elcvec[]) { - double chpottmp, suma; - double sumtmp; - cg_solve(nlocal,nghost,aval,acol_ind,arow_ptr,ch,elcvec); } diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 15d93dba59..6768b89acd 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -160,7 +160,7 @@ void NEB::run() else color = 1; MPI_Comm_split(uworld,color,0,&roots); - int ineb,idamp; + int ineb; for (ineb = 0; ineb < modify->nfix; ineb++) if (strcmp(modify->fix[ineb]->style,"neb") == 0) break; if (ineb == modify->nfix) error->all("NEB requires use of fix neb"); @@ -215,8 +215,6 @@ void NEB::run() // break induced if converged // damped dynamic min styles insure all replicas converge together - int flag,flagall; - timer->barrier_start(TIME_LOOP); while (update->minimize->niter < n1steps) { @@ -321,7 +319,6 @@ void NEB::readfile(char *file) double fraction = ireplica/(nreplica-1.0); double **x = atom->x; - int *image = atom->image; int nlocal = atom->nlocal; char *buffer = new char[CHUNK*MAXLINE]; diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 595fdfe993..90cb7b3241 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -375,7 +375,6 @@ void FixMSST::setup(int vflag) // to bias initial compression double **v = atom->v; - double *mass = atom->mass; int *mask = atom->mask; double sqrt_initial_temperature_scaling = sqrt(1.0-tscale); @@ -658,9 +657,7 @@ void FixMSST::remap(int flag) int i,n; double oldlo,oldhi,ctr; - double **x = atom->x; double **v = atom->v; - int *mask = atom->mask; if (flag) n = atom->nlocal + atom->nghost; else n = atom->nlocal; diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index f315bc2ffa..d46c58d434 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -413,7 +413,6 @@ void FixSRD::pre_neighbor() { int i,j,m,ix,iy,iz,jx,jy,jz,ibin,jbin,lo,hi; double rsq,cutbinsq; - double xlamda[3]; // grow SRD per-atom bin arrays if necessary @@ -643,7 +642,6 @@ void FixSRD::pre_neighbor() void FixSRD::post_force(int vflag) { int i,m,ix,iy,iz; - double xlamda[3]; // zero per-timestep stats @@ -775,7 +773,6 @@ void FixSRD::reset_velocities() double u[3],vave[3]; double vx,vy,vz,vsq; double *vold,*vnew,*xlamda; - double vstream[3]; // if requested, perform a dynamic shift @@ -2018,9 +2015,8 @@ void FixSRD::force_torque(double *vsold, double *vsnew, ------------------------------------------------------------------------- */ void FixSRD::force_wall(double *vsold, double *vsnew, int iwall) - { - double dpdt[3],xs_xb[3]; + double dpdt[3]; double factor = mass_srd / dt_big / force->ftm2v; dpdt[0] = factor * (vsnew[0] - vsold[0]); @@ -2411,7 +2407,6 @@ void FixSRD::big_static() if (avec_ellipsoid) ebonus = avec_ellipsoid->bonus; double *radius = atom->radius; int *ellipsoid = atom->ellipsoid; - int *type = atom->type; double skinhalf = 0.5 * neighbor->skin; diff --git a/src/XTC/dump_xtc.cpp b/src/XTC/dump_xtc.cpp index 1b96f9e1bb..f5355cdf5f 100644 --- a/src/XTC/dump_xtc.cpp +++ b/src/XTC/dump_xtc.cpp @@ -257,8 +257,6 @@ void DumpXTC::pack(int *ids) void DumpXTC::write_data(int n, double *mybuf) { - int j; - // copy buf atom coords into global array int m = 0; diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 811d5761a6..c166e3c2f5 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -134,7 +134,6 @@ void ComputeCentroAtom::compute_peratom() double **x = atom->x; int *mask = atom->mask; - int nall = atom->nlocal + atom->nghost; double cutsq = force->pair->cutforce * force->pair->cutforce; for (ii = 0; ii < inum; ii++) { diff --git a/src/compute_cluster_atom.cpp b/src/compute_cluster_atom.cpp index 0f3f3dd709..cb42cdbbf6 100644 --- a/src/compute_cluster_atom.cpp +++ b/src/compute_cluster_atom.cpp @@ -139,7 +139,6 @@ void ComputeClusterAtom::compute_peratom() // then check if any proc made changes double **x = atom->x; - int nall = atom->nlocal + atom->nghost; int change,done,anychange; diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 1461be86f8..5f3c087b32 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -118,7 +118,6 @@ void ComputeCoordAtom::compute_peratom() double **x = atom->x; int *mask = atom->mask; - int nall = atom->nlocal + atom->nghost; for (ii = 0; ii < inum; ii++) { i = ilist[ii]; diff --git a/src/compute_group_group.cpp b/src/compute_group_group.cpp index e7f80f66b7..ebbfe16d93 100644 --- a/src/compute_group_group.cpp +++ b/src/compute_group_group.cpp @@ -130,7 +130,6 @@ void ComputeGroupGroup::interact() int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index a8b6bff076..aa209f2454 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -123,7 +123,6 @@ int ComputePairLocal::compute_pairs(int flag) int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; diff --git a/src/compute_property_local.cpp b/src/compute_property_local.cpp index 8955393a14..5aa7652468 100644 --- a/src/compute_property_local.cpp +++ b/src/compute_property_local.cpp @@ -289,7 +289,6 @@ int ComputePropertyLocal::count_pairs(int allflag, int forceflag) int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; - int nall = nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index e1f75014e9..96a11ab273 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -207,7 +207,6 @@ void ComputeRDF::compute_array() int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; - int nall = atom->nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index 9342cb1c80..8764afe75b 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -594,7 +594,6 @@ double ComputeReduce::compute_one(int m, int flag) bigint ComputeReduce::count(int m) { int vidx = value2index[m]; - int aidx = argindex[m]; if (which[m] == X || which[m] == V || which[m] == F) return group->count(igroup); diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index b2323fbee9..eff9416b1c 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -170,7 +170,6 @@ double ComputeReduceRegion::compute_one(int m, int flag) } else one = fix_vector[flag]; } else { double **fix_array = fix->array_atom; - int n = nlocal; int jm1 = j - 1; if (flag < 0) { for (i = 0; i < nlocal; i++) @@ -223,10 +222,6 @@ double ComputeReduceRegion::compute_one(int m, int flag) bigint ComputeReduceRegion::count(int m) { int n = value2index[m]; - int j = argindex[m]; - - int *mask = atom->mask; - int nlocal = atom->nlocal; if (which[m] == X || which[m] == V || which[m] == F) return group->count(igroup,iregion); diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index dba5ea5ce4..3de098fdab 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -244,7 +244,6 @@ void DeleteAtoms::delete_overlap(int narg, char **arg) int *tag = atom->tag; int *mask = atom->mask; double **x = atom->x; - int nall = atom->nlocal + atom->nghost; double *special_coul = force->special_coul; double *special_lj = force->special_lj; diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index 0c3a0e14d6..5bf219d975 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -446,7 +446,6 @@ void DeleteBonds::command(int narg, char **arg) if (comm->me == 0) { if (atom->avec->bonds_allow) { - char str[128]; if (screen) fprintf(screen, " " BIGINT_FORMAT " total bonds, " BIGINT_FORMAT " turned on, " BIGINT_FORMAT " turned off\n", diff --git a/src/domain.cpp b/src/domain.cpp index f29a8b59bd..4688a733f1 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -687,7 +687,7 @@ void Domain::closest_image(double *xi, double *xj, double *xjimage) } else { while (dy > 0.0) { dy -= yprd; - dx == xy; + dx -= xy; } if (dy < -yprd_half) { dy += yprd; diff --git a/src/dump_cfg.cpp b/src/dump_cfg.cpp index 13bdfa7f66..3e7d83eff2 100755 --- a/src/dump_cfg.cpp +++ b/src/dump_cfg.cpp @@ -184,7 +184,6 @@ void DumpCFG::write_header(bigint n) void DumpCFG::write_data(int n, double *mybuf) { int i,j,m,itype; - int tag_i,index; double *rmass = atom->rmass; double *mass = atom->mass; diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 2512d6cfdc..8f225801ec 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -317,7 +317,6 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : colortype = new double*[ntypes+1]; colorelement = new double*[ntypes+1]; - int *icolor; for (int i = 1; i <= ntypes; i++) { diamtype[i] = 1.0; if (i % 6 == 1) colortype[i] = color2rgb("red"); @@ -856,7 +855,7 @@ void DumpImage::color_minmax() void DumpImage::create_image() { - int i,j,k,m,itype,atom1,atom2; + int i,j,m,itype,atom1,atom2; double diameter,delx,dely,delz; double *color,*color1,*color2; double xmid[3]; @@ -1125,7 +1124,6 @@ void DumpImage::draw_sphere(double *x, double *surfaceColor, double diameter) double dist = MathExtra::dot3(camPos,camDir) - MathExtra::dot3(xlocal,camDir); double radius = 0.5*diameter; - double radsq = radius*radius; double pixelWidth = (tanPerPixel > 0) ? tanPerPixel * dist : -tanPerPixel / zoom; double pixelRadiusFull = radius / pixelWidth; @@ -1396,7 +1394,7 @@ void DumpImage::compute_SSAO() // typical neighborhood value for shading - int x, y, s, r; + int x,y,s; int hPart = height / nprocs; for (y = me * hPart; y < (me + 1) * hPart; y ++) { for (x = 0; x < width; x ++) { @@ -1691,7 +1689,6 @@ int DumpImage::modify_param(int narg, char **arg) nentry = atoi(arg[5]); mentry = new MapEntry[nentry]; int n = 6; - int i = 0; for (int i = 0; i < nentry; i++) { if (mstyle == CONTINUOUS) { if (n+2 > narg) error->all("Illegal dump_modify command"); @@ -1732,7 +1729,6 @@ int DumpImage::modify_param(int narg, char **arg) if (nentry < 2) error->all("Invalid color map in dump_modify command"); if (mentry[0].single != MINVALUE || mentry[nentry-1].single != MAXVALUE) error->all("Invalid color map in dump_modify command"); - if (nentry > 2) double value = mentry[1].svalue; for (int i = 2; i < nentry-1; i++) if (mentry[i].svalue <= mentry[i-1].svalue) error->all("Invalid color map in dump_modify command"); diff --git a/src/dump_local.cpp b/src/dump_local.cpp index 811d06bc22..aa1bad31c6 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -220,14 +220,12 @@ int DumpLocal::count() nmine = -1; - int icompute; for (int i = 0; i < ncompute; i++) { if (nmine < 0) nmine = compute[i]->size_local_rows; else if (nmine != compute[i]->size_local_rows) error->one("Dump local count is not consistent across input fields"); } - int ifix; for (int i = 0; i < nfix; i++) { if (nmine < 0) nmine = fix[i]->size_local_rows; else if (nmine != fix[i]->size_local_rows) diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index 0ea30bc1da..9abf3e46d2 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -374,7 +374,7 @@ void FixAveCorrelate::setup(int vflag) void FixAveCorrelate::end_of_step() { - int i,j,k,m; + int i,j,m; double scalar; // skip if not step which requires doing something diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index f10e87f312..7d4d74d08a 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -364,8 +364,8 @@ double FixBoxRelax::min_energy(double *fextra) { double eng,scale,scalex,scaley,scalez,scalevol; - double t_current = temperature->compute_scalar(); - if (pstyle == ISO) double tmp = pressure->compute_scalar(); + temperature->compute_scalar(); + if (pstyle == ISO) pressure->compute_scalar(); else { temperature->compute_vector(); pressure->compute_vector(); @@ -735,7 +735,7 @@ int FixBoxRelax::modify_param(int narg, char **arg) void FixBoxRelax::compute_sigma() { - double pdevmod[3][3],pdeviatoric[3][3],htmp[3][3]; + double pdeviatoric[3][3],htmp[3][3]; double tmp1[3][3],sigma_tensor[3][3],h_invtmp[3][3]; // reset reference box dimensions diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index c47670af68..e887928993 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -307,7 +307,7 @@ void FixLangevin::post_force_no_tally() } } else if (which == BIAS) { - double tmp = temperature->compute_scalar(); + temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { gamma1 = -rmass[i] / t_period / ftm2v; @@ -352,7 +352,7 @@ void FixLangevin::post_force_no_tally() } } else if (which == BIAS) { - double tmp = temperature->compute_scalar(); + temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { gamma1 = gfactor1[type[i]]; @@ -454,7 +454,7 @@ void FixLangevin::post_force_tally() } } else if (which == BIAS) { - double tmp = temperature->compute_scalar(); + temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { gamma1 = -rmass[i] / t_period / ftm2v; @@ -492,7 +492,7 @@ void FixLangevin::post_force_tally() } } else if (which == BIAS) { - double tmp = temperature->compute_scalar(); + temperature->compute_scalar(); for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit) { gamma1 = gfactor1[type[i]]; @@ -582,7 +582,7 @@ void FixLangevin::angmom_thermostat(double tsqrt) int *type = atom->type; int nlocal = atom->nlocal; - double inertia[3],wbody[3],omega[3],tran[3],rot[3][3]; + double inertia[3],omega[3],tran[3]; double *shape,*quat; for (int i = 0; i < nlocal; i++) { diff --git a/src/fix_minimize.cpp b/src/fix_minimize.cpp index 734eb919fb..e90aea1468 100644 --- a/src/fix_minimize.cpp +++ b/src/fix_minimize.cpp @@ -225,7 +225,7 @@ int FixMinimize::unpack_exchange(int nlocal, double *buf) int n = 0; for (m = 0; m < nvector; m++) { - int nper = peratom[m]; + nper = peratom[m]; ni = nper*nlocal; for (iper = 0; iper < nper; iper++) vectors[m][ni++] = buf[n++]; } diff --git a/src/fix_move.cpp b/src/fix_move.cpp index f04de3f153..bb886f8ec0 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -737,10 +737,8 @@ void FixMove::final_integrate() else if (mstyle == ROTATE) zflag = 0; else if (mstyle == VARIABLE && (zvarstr || vzvarstr)) zflag = 0; - double **x = atom->x; double **v = atom->v; double **f = atom->f; - double **omega = atom->omega; double *rmass = atom->rmass; double *mass = atom->mass; int *type = atom->type; @@ -897,7 +895,6 @@ void FixMove::set_arrays(int i) } else if (mstyle == WIGGLE) { double arg = omega_rotate * delta; double sine = sin(arg); - double cosine = cos(arg); if (axflag) xoriginal[i][0] -= ax*sine; if (ayflag) xoriginal[i][1] -= ay*sine; if (azflag) xoriginal[i][2] -= az*sine; diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 674511a241..ed22905f9e 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -666,7 +666,7 @@ void FixNH::setup(int vflag) t_current = temperature->compute_scalar(); if (pstat_flag) { - if (pstyle == ISO) double tmp = pressure->compute_scalar(); + if (pstyle == ISO) pressure->compute_scalar(); else pressure->compute_vector(); couple(); pressure->addstep(update->ntimestep+1); @@ -741,7 +741,7 @@ void FixNH::initial_integrate(int vflag) if (pstat_flag) { if (pstyle == ISO) { temperature->compute_scalar(); - double tmp = pressure->compute_scalar(); + pressure->compute_scalar(); } else { temperature->compute_vector(); pressure->compute_vector(); @@ -788,7 +788,7 @@ void FixNH::final_integrate() t_current = temperature->compute_scalar(); if (pstat_flag) { - if (pstyle == ISO) double tmp = pressure->compute_scalar(); + if (pstyle == ISO) pressure->compute_scalar(); else pressure->compute_vector(); couple(); pressure->addstep(update->ntimestep+1); @@ -807,8 +807,6 @@ void FixNH::final_integrate() void FixNH::initial_integrate_respa(int vflag, int ilevel, int iloop) { - int i; - // set timesteps by level dtv = step_respa[ilevel]; @@ -844,7 +842,7 @@ void FixNH::initial_integrate_respa(int vflag, int ilevel, int iloop) if (pstat_flag) { if (pstyle == ISO) { temperature->compute_scalar(); - double tmp = pressure->compute_scalar(); + pressure->compute_scalar(); } else { temperature->compute_vector(); pressure->compute_vector(); @@ -1430,7 +1428,6 @@ double FixNH::compute_vector(int n) } } - int i; double volume; double kt = boltz * t_target; double lkt = tdof * kt; @@ -1641,7 +1638,7 @@ void FixNH::nhc_temp_integrate() void FixNH::nhc_press_integrate() { int ich,i; - double expfac,factor_etap,wmass,kecurrent; + double expfac,factor_etap,kecurrent; double kt = boltz * t_target; double lkt_press = kt; diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index 9f39466552..ed414e511d 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -39,8 +39,6 @@ FixNHSphere::FixNHSphere(LAMMPS *lmp, int narg, char **arg) : void FixNHSphere::init() { - int i,itype; - // check that all particles are finite-size // no point particles allowed @@ -48,7 +46,7 @@ void FixNHSphere::init() int *mask = atom->mask; int nlocal = atom->nlocal; - for (i = 0; i < nlocal; i++) + for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) if (radius[i] == 0.0) error->one("Fix nvt/sphere requires extended particles"); diff --git a/src/fix_nve_sphere.cpp b/src/fix_nve_sphere.cpp index fc67023f4a..935c9f0699 100644 --- a/src/fix_nve_sphere.cpp +++ b/src/fix_nve_sphere.cpp @@ -94,7 +94,6 @@ void FixNVESphere::init() void FixNVESphere::initial_integrate(int vflag) { - int itype; double dtfm,dtirotate,msq,scale; double g[3]; @@ -105,7 +104,6 @@ void FixNVESphere::initial_integrate(int vflag) double **torque = atom->torque; double *radius = atom->radius; double *rmass = atom->rmass; - int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; if (igroup == atom->firstgroup) nlocal = atom->nfirst; diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index c38f45066f..576d064409 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -104,7 +104,7 @@ void FixNVTSllod::nh_v_temp() // calculate temperature since some computes require temp // computed on current nlocal atoms to remove bias - if (nondeformbias) double tmp = temperature->compute_scalar(); + if (nondeformbias) temperature->compute_scalar(); double **v = atom->v; int *mask = atom->mask; diff --git a/src/fix_rigid.cpp b/src/fix_rigid.cpp index 71f61cdf5b..85e29292d7 100644 --- a/src/fix_rigid.cpp +++ b/src/fix_rigid.cpp @@ -472,14 +472,14 @@ int FixRigid::setmask() void FixRigid::init() { - int i,itype,ibody; + int i,ibody; triclinic = domain->triclinic; // warn if more than one rigid fix int count = 0; - for (int i = 0; i < modify->nfix; i++) + for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"rigid") == 0) count++; if (count > 1 && me == 0) error->warning("More than one fix rigid"); @@ -632,7 +632,7 @@ void FixRigid::init() // dx,dy,dz = coords relative to center-of-mass // symmetric 3x3 inertia tensor stored in Voigt notation as 6-vector - double dx,dy,dz,rad; + double dx,dy,dz; for (ibody = 0; ibody < nbody; ibody++) for (i = 0; i < 6; i++) sum[ibody][i] = 0.0; @@ -1519,7 +1519,7 @@ void FixRigid::deform(int flag) void FixRigid::set_xv() { - int ibody,itype; + int ibody; int xbox,ybox,zbox; double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone; double xy,xz,yz; @@ -1675,9 +1675,8 @@ void FixRigid::set_xv() void FixRigid::set_v() { - int ibody,itype; + int ibody; int xbox,ybox,zbox; - double dx,dy,dz; double x0,x1,x2,v0,v1,v2,fc0,fc1,fc2,massone; double xy,xz,yz; double ione[3],exone[3],eyone[3],ezone[3],delta[3],vr[6]; diff --git a/src/fix_rigid_nvt.cpp b/src/fix_rigid_nvt.cpp index 4ad18e1e7a..bad5e961df 100644 --- a/src/fix_rigid_nvt.cpp +++ b/src/fix_rigid_nvt.cpp @@ -287,7 +287,7 @@ void FixRigidNVT::initial_integrate(int vflag) void FixRigidNVT::final_integrate() { int i,ibody; - double tmp,scale_t,scale_r,akin_t,akin_r; + double tmp,scale_t,scale_r; double dtfm,xy,xz,yz; // compute velocity scales for translation and rotation diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index d1a637efea..c3e77cb5fe 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -186,7 +186,6 @@ void FixWallRegion::post_force(int vflag) double **x = atom->x; double **f = atom->f; double *radius = atom->radius; - int *type = atom->type; int *mask = atom->mask; int nlocal = atom->nlocal; @@ -335,12 +334,10 @@ void FixWallRegion::colloid(double r, double rad) double rinv2 = 1.0/r2; double r2inv2 = rinv2*rinv2; double r4inv2 = r2inv2*r2inv2; - double r6inv2 = r4inv2*r2inv2; double r3 = r + 0.5*diam; double rinv3 = 1.0/r3; double r2inv3 = rinv3*rinv3; double r4inv3 = r2inv3*r2inv3; - double r6inv3 = r4inv3*r2inv3; eng = coeff3*((-3.5*diam+r)*r4inv2*r2inv2*rinv2 + (3.5*diam+r)*r4inv3*r2inv3*rinv3) - coeff4*((-diam*r+r2*r3*(log(-r2)-log(r3)))* diff --git a/src/input.cpp b/src/input.cpp index 95839a0e19..c002917d4a 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -575,8 +575,7 @@ void Input::ifthenelse() ncommands++; } - for (int i = 0; i < ncommands; i++) - char *command = input->one(commands[i]); + for (int i = 0; i < ncommands; i++) input->one(commands[i]); for (int i = 0; i < ncommands; i++) delete [] commands[i]; delete [] commands; @@ -632,8 +631,7 @@ void Input::ifthenelse() // execute the list of commands - for (int i = 0; i < ncommands; i++) - char *command = input->one(commands[i]); + for (int i = 0; i < ncommands; i++) input->one(commands[i]); // clean up diff --git a/src/min.cpp b/src/min.cpp index 476af3991c..d7a80e72fe 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -354,7 +354,6 @@ void Min::run(int n) { // minimizer iterations - int iter_start = niter; stop_condition = iterate(n); stopstr = stopstrings(stop_condition); diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index 0f7c261cb9..f3ae5782a4 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -328,7 +328,7 @@ int MinLineSearch::linemin_quadratic(double eoriginal, double &alpha) int i,m,n; double fdothall,fdothme,hme,hmax,hmaxall; double de_ideal,de; - double delfh,engprev,relerr,alphaprev,fhprev,ff,fh,alpha0,fh0,ff0; + double delfh,engprev,relerr,alphaprev,fhprev,ff,fh,alpha0; double dot[2],dotall[2]; double *xatom,*x0atom,*fatom,*hatom; double alphamax; diff --git a/src/min_quickmin.cpp b/src/min_quickmin.cpp index ec59fd20f8..5ed10f8634 100644 --- a/src/min_quickmin.cpp +++ b/src/min_quickmin.cpp @@ -76,7 +76,7 @@ void MinQuickMin::reset_vectors() /* ---------------------------------------------------------------------- minimization via QuickMin damped dynamics -/* ---------------------------------------------------------------------- */ +------------------------------------------------------------------------- */ int MinQuickMin::iterate(int maxiter) { diff --git a/src/pair.cpp b/src/pair.cpp index f18e95dc36..0357188ff9 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -214,7 +214,7 @@ void Pair::reinit() void Pair::init_style() { - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index ef8631645d..fc405c2da5 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -259,7 +259,7 @@ void PairBuckCoulCut::init_style() if (!atom->q_flag) error->all("Pair style buck/coul/cut requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index 3660d85c29..16a5224324 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -202,7 +202,7 @@ void PairCoulCut::init_style() if (!atom->q_flag) error->all("Pair style coul/cut requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp index ac07ad7350..2ffb078bb0 100644 --- a/src/pair_dpd.cpp +++ b/src/pair_dpd.cpp @@ -258,7 +258,7 @@ void PairDPD::init_style() if (force->newton_pair == 0 && comm->me == 0) error->warning( "Pair dpd needs newton pair on for momentum conservation"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/pair_gauss.cpp b/src/pair_gauss.cpp index 355a2eaa9f..646a29cdbc 100644 --- a/src/pair_gauss.cpp +++ b/src/pair_gauss.cpp @@ -66,7 +66,7 @@ void PairGauss::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double r,rsq,r2inv,r6inv,forcelj,rexp; + double r,rsq,r2inv,forcelj; int *ilist,*jlist,*numneigh,**firstneigh; evdwl = 0.0; @@ -316,7 +316,7 @@ double PairGauss::single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { - double r2inv,r6inv,forcelj,philj,r; + double r2inv,forcelj,philj,r; r = sqrt(rsq); diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index d782d37289..efd0344823 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -249,7 +249,7 @@ void PairLJCutCoulCut::init_style() if (!atom->q_flag) error->all("Pair style lj/cut/coul/cut requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); } /* ---------------------------------------------------------------------- diff --git a/src/pair_lj_gromacs_coul_gromacs.cpp b/src/pair_lj_gromacs_coul_gromacs.cpp index 77d0138b81..356a4b768e 100644 --- a/src/pair_lj_gromacs_coul_gromacs.cpp +++ b/src/pair_lj_gromacs_coul_gromacs.cpp @@ -273,7 +273,7 @@ void PairLJGromacsCoulGromacs::init_style() if (!atom->q_flag) error->all("Pair style lj/gromacs/coul/gromacs requires atom attribute q"); - int irequest = neighbor->request(this); + neighbor->request(this); cut_lj_innersq = cut_lj_inner * cut_lj_inner; cut_ljsq = cut_lj * cut_lj; diff --git a/src/run.cpp b/src/run.cpp index 7ed02bd2ba..667ea84a80 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -231,8 +231,7 @@ void Run::command(int narg, char **arg) if (ncommands) { modify->clearstep_compute(); - for (int i = 0; i < ncommands; i++) - char *command = input->one(commands[i]); + for (int i = 0; i < ncommands; i++) input->one(commands[i]); modify->addstep_compute(update->ntimestep + nevery); } diff --git a/src/set.cpp b/src/set.cpp index fc8b894edf..941a57db75 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -469,7 +469,6 @@ void Set::setrandom(int keyword) // dipole length is determined by dipole type array } else if (keyword == DIPOLE_RANDOM) { - int *type = atom->type; double **mu = atom->mu; int nlocal = atom->nlocal; diff --git a/src/update.cpp b/src/update.cpp index 5718368d18..3320ce9d8a 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -34,7 +34,6 @@ using namespace LAMMPS_NS; Update::Update(LAMMPS *lmp) : Pointers(lmp) { - int n; char *str; ntimestep = 0; diff --git a/src/variable.cpp b/src/variable.cpp index d98897df69..b8ec5e589e 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -666,7 +666,7 @@ double Variable::evaluate(char *str, Tree **tree) if (tree) { Tree *newtree; - double tmp = evaluate(contents,&newtree); + evaluate(contents,&newtree); treestack[ntreestack++] = newtree; } else argstack[nargstack++] = evaluate(contents,NULL); @@ -1135,7 +1135,7 @@ double Variable::evaluate(char *str, Tree **tree) if (tree == NULL) error->all("Atom-style variable in equal-style variable formula"); Tree *newtree; - double tmp = evaluate(data[ivar][0],&newtree); + evaluate(data[ivar][0],&newtree); treestack[ntreestack++] = newtree; // v_name[N] = scalar from atom-style per-atom vector @@ -1408,7 +1408,7 @@ double Variable::evaluate(char *str, Tree **tree) double Variable::collapse_tree(Tree *tree) { - double arg1,arg2,arg3; + double arg1,arg2; if (tree->type == VALUE) return tree->value; if (tree->type == ATOMARRAY) return 0.0; @@ -1660,8 +1660,8 @@ double Variable::collapse_tree(Tree *tree) // random() or normal() do not become a single collapsed value if (tree->type == RANDOM) { - double lower = collapse_tree(tree->left); - double upper = collapse_tree(tree->middle); + collapse_tree(tree->left); + collapse_tree(tree->middle); if (randomatom == NULL) { int seed = static_cast (collapse_tree(tree->right)); if (seed <= 0) error->one("Invalid math function in variable formula"); @@ -1671,7 +1671,7 @@ double Variable::collapse_tree(Tree *tree) } if (tree->type == NORMAL) { - double mu = collapse_tree(tree->left); + collapse_tree(tree->left); double sigma = collapse_tree(tree->middle); if (sigma < 0.0) error->one("Invalid math function in variable formula"); if (randomatom == NULL) { @@ -3142,7 +3142,6 @@ double Variable::evaluate_boolean(char *str) int op,opprevious; double value1,value2; char onechar; - char *ptr; double argstack[MAXLEVEL]; int opstack[MAXLEVEL];