From b417cfda9b81298d610f63c1fd5438f6670d3ebf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 3 Feb 2019 11:36:41 -0500 Subject: [PATCH] removed dead code and reduce compiler warnings about unused parameters --- src/BODY/fix_wall_body_polygon.cpp | 12 +++++------- src/BODY/fix_wall_body_polyhedron.cpp | 19 +++++++------------ src/GPU/pair_born_coul_long_cs_gpu.cpp | 4 ++-- src/GPU/pair_born_coul_long_gpu.cpp | 4 ++-- src/GPU/pair_born_coul_wolf_cs_gpu.cpp | 6 +++--- src/GPU/pair_buck_coul_long_gpu.cpp | 4 ++-- src/GPU/pair_colloid_gpu.cpp | 5 +++-- src/GPU/pair_coul_long_cs_gpu.cpp | 6 +++--- src/GPU/pair_coul_long_gpu.cpp | 6 +++--- src/GPU/pair_eam_alloy_gpu.cpp | 6 +++--- src/GPU/pair_eam_fs_gpu.cpp | 6 +++--- src/GPU/pair_eam_gpu.cpp | 6 +++--- src/GPU/pair_gayberne_gpu.cpp | 5 +++-- src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 5 ++--- src/GPU/pair_lj_class2_coul_long_gpu.cpp | 4 ++-- src/GPU/pair_lj_cut_coul_long_gpu.cpp | 4 ++-- src/GPU/pair_lj_cut_coul_msm_gpu.cpp | 5 +++-- src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 7 +------ src/GPU/pair_lj_expand_coul_long_gpu.cpp | 4 ++-- src/GPU/pair_mie_cut_gpu.cpp | 4 ++-- src/GPU/pair_morse_gpu.cpp | 2 +- src/GPU/pair_resquared_gpu.cpp | 5 +++-- src/GPU/pair_soft_gpu.cpp | 4 ++-- src/GPU/pair_table_gpu.cpp | 2 +- src/GPU/pair_ufm_gpu.cpp | 4 ++-- src/GPU/pair_vashishta_gpu.cpp | 2 +- src/GPU/pair_yukawa_colloid_gpu.cpp | 4 ++-- src/GPU/pair_yukawa_gpu.cpp | 4 ++-- src/GPU/pair_zbl_gpu.cpp | 2 +- src/MANYBODY/pair_bop.cpp | 4 ++-- src/PYTHON/pair_python.cpp | 6 +++--- src/atom.cpp | 2 +- src/compute_reduce_region.cpp | 1 - src/pair.cpp | 8 ++++---- src/read_data.cpp | 2 +- src/read_restart.cpp | 2 +- 36 files changed, 83 insertions(+), 93 deletions(-) diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 0c9bd3e741..221937461b 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -206,7 +206,7 @@ void FixWallBodyPolygon::setup(int vflag) void FixWallBodyPolygon::post_force(int /*vflag*/) { - double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,rradi,wall_pos; + double vwall[3],dx,dy,dz,del1,del2,delxy,delr,rsq,eradi,wall_pos; int i,ni,npi,ifirst,nei,iefirst,side; double facc[3]; @@ -316,7 +316,6 @@ void FixWallBodyPolygon::post_force(int /*vflag*/) nei = ednum[i]; iefirst = edfirst[i]; eradi = enclosing_radius[i]; - rradi = rounded_radius[i]; // reset vertex and edge forces @@ -332,14 +331,14 @@ void FixWallBodyPolygon::post_force(int /*vflag*/) edge[iefirst+ni][4] = 0; } - int interact, num_contacts, done; + int num_contacts, done; double delta_a, delta_ua, j_a; Contact contact_list[MAX_CONTACTS]; num_contacts = 0; facc[0] = facc[1] = facc[2] = 0; - interact = vertex_against_wall(i, wall_pos, x, f, torque, side, - contact_list, num_contacts, facc); + vertex_against_wall(i, wall_pos, x, f, torque, side, + contact_list, num_contacts, facc); if (num_contacts >= 2) { @@ -475,12 +474,11 @@ int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos, Contact* contact_list, int &num_contacts, double* /*facc*/) { int ni, npi, ifirst, interact; - double xpi[3], eradi, rradi; + double xpi[3], rradi; double fx, fy, fz; npi = dnum[i]; ifirst = dfirst[i]; - eradi = enclosing_radius[i]; rradi = rounded_radius[i]; interact = 0; diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 295608a444..24a9e51dad 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -213,8 +213,8 @@ void FixWallBodyPolyhedron::setup(int vflag) void FixWallBodyPolyhedron::post_force(int /*vflag*/) { - double vwall[3],dx,dy,dz,del1,del2,rsq,eradi,rradi,wall_pos; - int i,ni,npi,ifirst,nei,iefirst,nfi,iffirst,side; + double vwall[3],dx,dy,dz,del1,del2,rsq,wall_pos; + int i,ni,npi,ifirst,nei,iefirst,side; double facc[3]; // set position of wall to initial settings and velocity to 0.0 @@ -330,10 +330,6 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/) ifirst = dfirst[i]; nei = ednum[i]; iefirst = edfirst[i]; - nfi = facnum[i]; - iffirst = facfirst[i]; - eradi = enclosing_radius[i]; - rradi = rounded_radius[i]; if (npi == 1) { sphere_against_wall(i, wall_pos, side, vwall, x, v, f, angmom, torque); @@ -356,13 +352,13 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/) edge[iefirst+ni][5] = 0; } - int interact, num_contacts; + int num_contacts; Contact contact_list[MAX_CONTACTS]; num_contacts = 0; facc[0] = facc[1] = facc[2] = 0; - interact = edge_against_wall(i, wall_pos, side, vwall, x, f, torque, - contact_list, num_contacts, facc); + edge_against_wall(i, wall_pos, side, vwall, x, f, torque, + contact_list, num_contacts, facc); } // group bit } @@ -544,7 +540,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos, int side, double* vwall, double** x, double** /*f*/, double** /*torque*/, Contact* /*contact_list*/, int &/*num_contacts*/, double* /*facc*/) { - int ni, nei, mode, contact; + int ni, nei, contact; double rradi; nei = ednum[i]; @@ -555,8 +551,7 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos, // loop through body i's edges for (ni = 0; ni < nei; ni++) - mode = compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall, - contact); + compute_distance_to_wall(i, ni, x[i], rradi, wall_pos, side, vwall, contact); return contact; } diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 13cf5f643a..587c7b5215 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -212,8 +212,8 @@ double PairBornCoulLongCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBornCoulLongCSGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index c3c3fee40c..1549ed79af 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -207,8 +207,8 @@ double PairBornCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBornCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 90ddf825a9..bf23007bca 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -193,9 +193,9 @@ double PairBornCoulWolfCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, - int **firstneigh) { +void PairBornCoulWolfCSGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,qtmp,delx,dely,delz,evdwl,ecoul,fpair; double rsq,r2inv,r6inv,forcecoul,forceborn,factor_coul,factor_lj; diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index 73821cee8a..a2d14ea25f 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -201,8 +201,8 @@ double PairBuckCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairBuckCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index 7bbac32ed3..03e5aac5d5 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -184,8 +184,9 @@ double PairColloidGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairColloidGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairColloidGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index cbb9c73ceb..be2a090786 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -153,7 +153,7 @@ void PairCoulLongCSGPU::init_style() for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { - double cut = init_one(i,j); + init_one(i,j); } } } @@ -208,8 +208,8 @@ double PairCoulLongCSGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairCoulLongCSGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair; diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index 2f12e41b0c..684b0049c0 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -148,7 +148,7 @@ void PairCoulLongGPU::init_style() for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) { - double cut = init_one(i,j); + init_one(i,j); } } } @@ -203,8 +203,8 @@ double PairCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,ecoul,fpair; diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 11af562f15..20bf6dc50d 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -192,8 +192,8 @@ void PairEAMAlloyGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -235,7 +235,7 @@ double PairEAMAlloyGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMAlloyGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index ef8dd09e23..821bb1af1c 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -192,8 +192,8 @@ void PairEAMFSGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMFSGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -235,7 +235,7 @@ double PairEAMFSGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMFSGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index e2eb9daced..515a349ad2 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -195,8 +195,8 @@ void PairEAMGPU::init_style() /* ---------------------------------------------------------------------- */ double PairEAMGPU::single(int i, int j, int itype, int jtype, - double rsq, double factor_coul, double factor_lj, - double &fforce) + double rsq, double /* factor_coul */, + double /* factor_lj */, double &fforce) { int m; double r,p,rhoip,rhojp,z2,z2p,recip,phi,phip,psip; @@ -238,7 +238,7 @@ double PairEAMGPU::single(int i, int j, int itype, int jtype, /* ---------------------------------------------------------------------- */ int PairEAMGPU::pack_forward_comm(int n, int *list, double *buf, - int pbc_flag,int *pbc) + int /* pbc_flag */, int * /* pbc */) { int i,j,m; diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 8bd5eb073f..32b8b979cd 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -221,8 +221,9 @@ double PairGayBerneGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairGayBerneGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index 8c806053d4..ebc9f88943 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -151,11 +151,10 @@ void PairLJCharmmCoulLongGPU::init_style() // Repeat cutsq calculation because done after call to init_style - double cut; for (int i = 1; i <= atom->ntypes; i++) { for (int j = i; j <= atom->ntypes; j++) { if (setflag[i][j] != 0 || (setflag[i][i] != 0 && setflag[j][j] != 0)) - cut = init_one(i,j); + init_one(i,j); } } @@ -219,7 +218,7 @@ double PairLJCharmmCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJCharmmCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, + int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index 214ff306db..797680c032 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -197,8 +197,8 @@ double PairLJClass2CoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJClass2CoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index 3cccb898cc..943d12b0fe 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -215,8 +215,8 @@ double PairLJCutCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJCutCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index 04ffe245b2..46cf6f19bc 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -192,8 +192,9 @@ double PairLJCutCoulMSMGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairLJCutCoulMSMGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairLJCutCoulMSMGPU::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; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; double fraction,table; diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index 870dc8ba6d..b209fa0ee7 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -216,7 +216,7 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl double qtmp,xtmp,ytmp,ztmp,delx,dely,delz; double rsq,r,rinv,r2inv,r6inv; double forcecoulx,forcecouly,forcecoulz,fforce; - double tixcoul,tiycoul,tizcoul,tjxcoul,tjycoul,tjzcoul; + double tixcoul,tiycoul,tizcoul; double fx,fy,fz,fdx,fdy,fdz,fax,fay,faz; double pdotp,pidotr,pjdotr,pre1,pre2,pre3; double grij,expm2,t,erfc; @@ -378,14 +378,9 @@ void PairLJCutDipoleLongGPU::cpu_compute(int start, int inum, int eflag, int vfl tixcoul = mu[i][1]*(zdiz + zaiz) - mu[i][2]*(zdiy + zaiy); tiycoul = mu[i][2]*(zdix + zaix) - mu[i][0]*(zdiz + zaiz); tizcoul = mu[i][0]*(zdiy + zaiy) - mu[i][1]*(zdix + zaix); - tjxcoul = mu[j][1]*(zdjz + zajz) - mu[j][2]*(zdjy + zajy); - tjycoul = mu[j][2]*(zdjx + zajx) - mu[j][0]*(zdjz + zajz); - tjzcoul = mu[j][0]*(zdjy + zajy) - mu[j][1]*(zdjx + zajx); - } else { forcecoulx = forcecouly = forcecoulz = 0.0; tixcoul = tiycoul = tizcoul = 0.0; - tjxcoul = tjycoul = tjzcoul = 0.0; } // LJ interaction diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index 49e8be5879..4161155980 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -215,8 +215,8 @@ double PairLJExpandCoulLongGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairLJExpandCoulLongGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype,itable; double qtmp,xtmp,ytmp,ztmp,delx,dely,delz,evdwl,ecoul,fpair; diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 5919b05466..e52577ee4c 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -172,8 +172,8 @@ double PairMIECutGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairMIECutGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,r2inv,rgamR,rgamA,forcemie,factor_mie; diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index 81ea7c818a..7abf78ff30 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -168,7 +168,7 @@ double PairMorseGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairMorseGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 34bd0ec22f..b6fada0897 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -219,8 +219,9 @@ double PairRESquaredGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) +void PairRESquaredGPU::cpu_compute(int start, int inum, int eflag, + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double evdwl,one_eng,rsq,r2inv,r6inv,forcelj,factor_lj; diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index cc0ea72633..eed1bd5db3 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -182,8 +182,8 @@ double PairSoftGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairSoftGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double r,rsq,arg,factor_lj; diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index c5aef996db..d0185b85e8 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -246,7 +246,7 @@ double PairTableGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairTableGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairTableGPU::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; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 40e8df3323..688e3ef4dc 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -186,8 +186,8 @@ double PairUFMGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairUFMGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,expuf,factor_lj; diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 00dbac5f1e..84936f2c26 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -151,7 +151,7 @@ void PairVashishtaGPU::init_style() if (force->newton_pair != 0) error->all(FLERR,"Pair style vashishta/gpu requires newton pair off"); - double *cutsq, *r0, *r0eps, *gamma, *eta; + double *cutsq, *r0, *gamma, *eta; double *lam1inv, *lam4inv, *zizj, *mbigd; double *dvrc, *big6w, *heta, *bigh; double *bigw, *c0, *costheta, *bigb; diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 0332e5f755..556dece7f8 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -179,8 +179,8 @@ double PairYukawaColloidGPU::memory_usage() /* ---------------------------------------------------------------------- */ void PairYukawaColloidGPU::cpu_compute(int start, int inum, int eflag, - int vflag, int *ilist, int *numneigh, - int **firstneigh) { + int /* vflag */, int *ilist, + int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair,radi,radj; double r,rsq,rinv,screening,forceyukawa,factor; diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index dda4250f07..9d3ea6f5a7 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -170,8 +170,8 @@ double PairYukawaGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int vflag, - int *ilist, int *numneigh, int **firstneigh) { +void PairYukawaGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, + int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,r2inv,r,rinv,screening,forceyukawa,factor; diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index daca79c8e3..c9b8dd75a1 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -177,7 +177,7 @@ double PairZBLGPU::memory_usage() /* ---------------------------------------------------------------------- */ -void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int vflag, +void PairZBLGPU::cpu_compute(int start, int inum, int eflag, int /* vflag */, int *ilist, int *numneigh, int **firstneigh) { int i,j,ii,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index ca0f229068..6540dedf98 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -4988,7 +4988,7 @@ void PairBOP::read_table(char *filename) fgets(s,MAXLINE,fp); nws=0; ws=1; - for(j=0;j= memlength) { + if ((int)strlen(memstr) + n >= memlength) { memlength += DELTA_MEMSTR; memory->grow(memstr,memlength,"atom:memstr"); } diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index 3dd671ce2b..8e91a299e8 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -78,7 +78,6 @@ double ComputeReduceRegion::compute_one(int m, int flag) n = value2index[m]; } - int aidx = argindex[m]; int j = argindex[m]; double one = 0.0; diff --git a/src/pair.cpp b/src/pair.cpp index cc066713c9..62d8f6049c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -151,13 +151,13 @@ void Pair::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"table") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command"); ncoultablebits = force->inumeric(FLERR,arg[iarg+1]); - if (ncoultablebits > sizeof(float)*CHAR_BIT) + if (ncoultablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); iarg += 2; } else if (strcmp(arg[iarg],"table/disp") == 0) { if (iarg+2 > narg) error->all(FLERR,"Illegal pair_modify command"); ndisptablebits = force->inumeric(FLERR,arg[iarg+1]); - if (ndisptablebits > sizeof(float)*CHAR_BIT) + if (ndisptablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); iarg += 2; } else if (strcmp(arg[iarg],"tabinner") == 0) { @@ -1695,7 +1695,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits, if (sizeof(int) != sizeof(float)) error->all(FLERR,"Bitmapped lookup tables require int/float be same size"); - if (ntablebits > sizeof(float)*CHAR_BIT) + if (ntablebits > (int)sizeof(float)*CHAR_BIT) error->all(FLERR,"Too many total bits for bitmapped lookup table"); if (inner >= outer) @@ -1719,7 +1719,7 @@ void Pair::init_bitmap(double inner, double outer, int ntablebits, int nmantbits = ntablebits - nexpbits; - if (nexpbits > sizeof(float)*CHAR_BIT - FLT_MANT_DIG) + if (nexpbits > (int)sizeof(float)*CHAR_BIT - FLT_MANT_DIG) error->all(FLERR,"Too many exponent bits for lookup table"); if (nmantbits+1 > FLT_MANT_DIG) error->all(FLERR,"Too many mantissa bits for lookup table"); diff --git a/src/read_data.cpp b/src/read_data.cpp index 373ba30151..4d7c855065 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -1963,7 +1963,7 @@ void ReadData::parse_keyword(int first) } while (eof == 0 && done == 0) { int blank = strspn(line," \t\n\r"); - if ((blank == strlen(line)) || (line[blank] == '#')) { + if ((blank == (int)strlen(line)) || (line[blank] == '#')) { if (fgets(line,MAXLINE,fp) == NULL) eof = 1; } else done = 1; } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 82028d8316..73dc37f4cb 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -627,7 +627,7 @@ void ReadRestart::file_search(char *infile, char *outfile) if ((ptr = strstr(&ep->d_name[nbegin],end)) == NULL) continue; if (strlen(end) == 0) ptr = ep->d_name + strlen(ep->d_name); *ptr = '\0'; - if (strlen(&ep->d_name[nbegin]) < n) { + if ((int)strlen(&ep->d_name[nbegin]) < n) { strcpy(middle,&ep->d_name[nbegin]); if (ATOBIGINT(middle) > maxnum) maxnum = ATOBIGINT(middle); }