diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp
index 5ba4bce8e825d1a42c75b3c585118fcd084126e2..0e2ebbed8307e90341247be332e1d9a90f0219d6 100644
--- a/src/BODY/body_rounded_polyhedron.cpp
+++ b/src/BODY/body_rounded_polyhedron.cpp
@@ -96,7 +96,7 @@ int BodyRoundedPolyhedron::nedges(AtomVecBody::Bonus *bonus)
 {
   int nvertices = bonus->ivalue[0];
   int nedges = bonus->ivalue[1];
-  int nfaces = bonus->ivalue[2];
+  //int nfaces = bonus->ivalue[2];
   if (nvertices == 1) return 0;
   else if (nvertices == 2) return 1;
   return nedges; //(nvertices+nfaces-2); // Euler's polyon formula: V-E+F=2
@@ -463,7 +463,7 @@ void BodyRoundedPolyhedron::output(int ibonus, int m, double *values)
 int BodyRoundedPolyhedron::image(int ibonus, double flag1, double /*flag2*/,
                               int *&ivec, double **&darray)
 {
-  int j, nelements;
+  int nelements;
   double p[3][3];
   double *x, rrad;
 
@@ -488,7 +488,7 @@ int BodyRoundedPolyhedron::image(int ibonus, double flag1, double /*flag2*/,
 
     nelements = nvertices;
   } else {
-    int nfaces = bonus->ivalue[2];
+    //int nfaces = bonus->ivalue[2];
     int nedges = bonus->ivalue[1]; //nvertices + nfaces - 2;
     if (nvertices == 2) nedges = 1; // special case: rods
     double* edge_ends = &bonus->dvalue[3*nvertices];
diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp
index f217db774ea31efd741fff2a416b37aca59bd8f7..3f8c08b6bdfae307512aae97d1b88be821a4b433 100644
--- a/src/BODY/fix_wall_body_polygon.cpp
+++ b/src/BODY/fix_wall_body_polygon.cpp
@@ -310,9 +310,6 @@ void FixWallBodyPolygon::post_force(int /*vflag*/)
       rsq = dx*dx + dy*dy + dz*dz;
       if (rsq > radius[i]*radius[i]) continue;
 
-      double r = sqrt(rsq);
-      double rsqinv = 1.0 / rsq;
-
       if (dnum[i] == 0) body2space(i);
       npi = dnum[i];
       ifirst = dfirst[i];
@@ -478,9 +475,8 @@ 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], xpj[3], dist, eradi, rradi;
-  double fx, fy, fz, rx, ry, rz;
-  int nlocal = atom->nlocal;
+  double xpi[3], eradi, rradi;
+  double fx, fy, fz;
 
   npi = dnum[i];
   ifirst = dfirst[i];
@@ -499,9 +495,9 @@ int FixWallBodyPolygon::vertex_against_wall(int i, double wall_pos,
     xpi[1] = x[i][1] + discrete[ifirst+ni][1];
     xpi[2] = x[i][2] + discrete[ifirst+ni][2];
 
-    int mode, contact, p2vertex;
-    double d, R, hi[3], t, delx, dely, delz, fpair, shift;
-    double xj[3], rij;
+    int mode, contact;
+    double d, R, hi[3], delx, dely, delz, fpair;
+    double rij;
 
     // compute the distance from the vertex xpi to the wall
 
@@ -671,7 +667,7 @@ void FixWallBodyPolygon::contact_forces(Contact& contact, double j_a,
                       double** x, double** v, double** angmom, double** f,
                       double** torque, double* vwall, double* facc)
 {
-  int ibody,ibonus,ifirst, jefirst, ni;
+  int ibody,ibonus,ifirst, ni;
   double fx,fy,fz,delx,dely,delz,rsq,rsqinv;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
   double fn[3],ft[3],vi[3];
diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp
index b90731acf65187f8393230004081b2add6e018cf..5a066b88bb7c82ec9deb76c28c0cb93bdf90f2a6 100644
--- a/src/BODY/fix_wall_body_polyhedron.cpp
+++ b/src/BODY/fix_wall_body_polyhedron.cpp
@@ -213,7 +213,7 @@ void FixWallBodyPolyhedron::setup(int vflag)
 
 void FixWallBodyPolyhedron::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,rsq,eradi,rradi,wall_pos;
   int i,ni,npi,ifirst,nei,iefirst,nfi,iffirst,side;
   double facc[3];
 
@@ -325,9 +325,6 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/)
       rsq = dx*dx + dy*dy + dz*dz;
       if (rsq > radius[i]*radius[i]) continue;
 
-      double r = sqrt(rsq);
-      double rsqinv = 1.0 / rsq;
-
       if (dnum[i] == 0) body2space(i);
       npi = dnum[i];
       ifirst = dfirst[i];
@@ -359,8 +356,7 @@ void FixWallBodyPolyhedron::post_force(int /*vflag*/)
         edge[iefirst+ni][5] = 0;
       }
 
-      int interact, num_contacts, done;
-      double delta_a, delta_ua, j_a;
+      int interact, num_contacts;
       Contact contact_list[MAX_CONTACTS];
 
       num_contacts = 0;
@@ -550,7 +546,6 @@ int FixWallBodyPolyhedron::edge_against_wall(int i, double wall_pos,
 {
   int ni, nei, mode, contact;
   double rradi;
-  int nlocal = atom->nlocal;
 
   nei = ednum[i];
   rradi = rounded_radius[i];
@@ -702,10 +697,10 @@ void FixWallBodyPolyhedron::contact_forces(int ibody,
   double fx, double fy, double fz, double** x, double** v, double** angmom,
   double** f, double** torque, double* vwall)
 {
-  int ibonus,jbonus;
+  int ibonus;
   double fxt,fyt,fzt,rsq,rsqinv;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
-  double fn[3],ft[3],vi[3],vj[3];
+  double fn[3],ft[3],vi[3];
   double *quat, *inertia;
   AtomVecBody::Bonus *bonus;
 
@@ -787,7 +782,7 @@ void FixWallBodyPolyhedron::contact_forces(Contact& contact, double j_a,
                       double** x, double** v, double** angmom, double** f,
                       double** torque, double* vwall, double* facc)
 {
-  int ibody,ibonus,ifirst, jefirst, ni;
+  int ibody,ibonus,ifirst,ni;
   double fx,fy,fz,delx,dely,delz,rsq,rsqinv;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
   double fn[3],ft[3],vi[3];
diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp
index 97d3ad5606075e12f263979186d7eccb00984885..6a176f1083542857951051d2cf6d456991663854 100644
--- a/src/BODY/pair_body_rounded_polygon.cpp
+++ b/src/BODY/pair_body_rounded_polygon.cpp
@@ -105,10 +105,9 @@ void PairBodyRoundedPolygon::compute(int eflag, int vflag)
   int i,j,ii,jj,inum,jnum,itype,jtype;
   int ni,nj,npi,npj,ifirst,jfirst;
   int nei,nej,iefirst,jefirst;
-  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fx,fy,fz;
+  double xtmp,ytmp,ztmp,delx,dely,delz,evdwl;
   double rsq,rsqinv,r,radi,radj,eradi,eradj,rradi,rradj,k_nij,k_naij;
-  double xi[3],xj[3],fi[3],fj[3],ti[3],tj[3],facc[3];
-  double *dxi,*dxj;
+  double xi[3],xj[3],facc[3];
   int *ilist,*jlist,*numneigh,**firstneigh;
 
   evdwl = 0.0;
@@ -709,9 +708,8 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
   int ni, npi, ifirst, nei, iefirst;
   int nj, npj, jfirst, nej, jefirst;
   double xpi[3], xpj[3], dist, eradi, eradj, rradi, rradj;
-  double fx, fy, fz, rx, ry, rz, energy;
+  double fx, fy, fz, energy;
   int interact;
-  int nlocal = atom->nlocal;
 
   npi = dnum[i];
   ifirst = dfirst[i];
@@ -758,7 +756,7 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
 
     int mode, contact, p2vertex;
     double d, R, hi[3], t, delx, dely, delz, fpair, shift;
-    double xj[3], rij;
+    double rij;
 
     // loop through body j's edges
 
@@ -781,6 +779,7 @@ int PairBodyRoundedPolygon::vertex_against_edge(int i, int j,
         if (mode == VERTEXI) p2vertex = edge[jefirst+nj][0];
         else if (mode == VERTEXJ) p2vertex = edge[jefirst+nj][1];
 
+        // double xj[3];
         // p2.body2space(p2vertex, xj);
         xpj[0] = x[j][0] + discrete[jfirst+p2vertex][0];
         xpj[1] = x[j][1] + discrete[jfirst+p2vertex][1];
diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp
index 051be762e5a432193326596e6acbc3ad7bb9e616..eea2aa37249e011bab1a5122282c4b3511f48f5d 100644
--- a/src/BODY/pair_body_rounded_polyhedron.cpp
+++ b/src/BODY/pair_body_rounded_polyhedron.cpp
@@ -603,7 +603,7 @@ void PairBodyRoundedPolyhedron::sphere_against_sphere(int ibody, int jbody,
 {
   double rradi,rradj,contact_dist;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
-  double rij,rsqinv,R,fx,fy,fz,fn[3],ft[3],fpair,shift,energy;
+  double rij,rsqinv,R,fx,fy,fz,fn[3],ft[3],fpair,energy;
   int nlocal = atom->nlocal;
   int newton_pair = force->newton_pair;
 
@@ -685,7 +685,7 @@ void PairBodyRoundedPolyhedron::sphere_against_edge(int ibody, int jbody,
 {
   int ni,nei,ifirst,iefirst,npi1,npi2,ibonus;
   double xi1[3],xi2[3],vti[3],h[3],fn[3],ft[3],d,t;
-  double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,shift,energy;
+  double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,energy;
   double rradi,rradj,contact_dist;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
   double *quat, *inertia;
@@ -835,7 +835,7 @@ void PairBodyRoundedPolyhedron::sphere_against_face(int ibody, int jbody,
 {
   int ni,nfi,inside,ifirst,iffirst,npi1,npi2,npi3,ibonus,tmp;
   double xi1[3],xi2[3],xi3[3],ui[3],vi[3],vti[3],n[3],h[3],fn[3],ft[3],d;
-  double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,shift,energy;
+  double delx,dely,delz,rsq,rij,rsqinv,R,fx,fy,fz,fpair,energy;
   double rradi,rradj,contact_dist;
   double vr1,vr2,vr3,vnnr,vn1,vn2,vn3,vt1,vt2,vt3;
   double *quat, *inertia;
@@ -988,7 +988,7 @@ int PairBodyRoundedPolyhedron::edge_against_edge(int ibody, int jbody,
   int itype, int jtype, double** x, Contact* contact_list, int &num_contacts,
   double &evdwl, double* facc)
 {
-  int ni,nei,nj,nej,contact,interact;
+  int ni,nei,nj,nej,interact;
   double rradi,rradj,energy;
 
   nei = ednum[ibody];
@@ -1045,7 +1045,7 @@ int PairBodyRoundedPolyhedron::edge_against_face(int ibody, int jbody,
   int itype, int jtype, double** x, Contact* contact_list, int &num_contacts,
   double &evdwl, double* facc)
 {
-  int ni,nei,nj,nfj,contact,interact;
+  int ni,nei,nj,nfj,interact;
   double rradi,rradj,energy;
 
   nei = ednum[ibody];
@@ -1118,7 +1118,7 @@ int PairBodyRoundedPolyhedron::interaction_edge_to_edge(int ibody,
   int ifirst,iefirst,jfirst,jefirst,npi1,npi2,npj1,npj2,interact;
   double xi1[3],xi2[3],xpj1[3],xpj2[3];
   double r,t1,t2,h1[3],h2[3];
-  double contact_dist, shift;
+  double contact_dist;
 
   double** x = atom->x;
   double** v = atom->v;
@@ -1314,7 +1314,7 @@ int PairBodyRoundedPolyhedron::interaction_face_to_edge(int ibody,
 
   // determine the intersection of the edge to the face
 
-  double hi1[3], hi2[3], d1, d2, contact_dist, shift;
+  double hi1[3], hi2[3], d1, d2, contact_dist;
   int inside1 = 0;
   int inside2 = 0;
 
@@ -2345,9 +2345,8 @@ void PairBodyRoundedPolyhedron::find_unique_contacts(Contact* contact_list,
 void PairBodyRoundedPolyhedron::sanity_check()
 {
 
-  double x1[3],x2[3],x3[3],x4[3],h_a[3],h_b[3],d_a,d_b,u[3],v[3],n[3];
+  double x1[3],x2[3],x3[3],x4[3],h_a[3],h_b[3],d_a,d_b;
   double a[3],b[3],t_a,t_b;
-  int inside_a, inside_b;
 
   x1[0] = 0; x1[1] = 3; x1[2] = 0;
   x2[0] = 3; x2[1] = 0; x2[2] = 0;
@@ -2364,9 +2363,11 @@ void PairBodyRoundedPolyhedron::sanity_check()
     h_a[0], h_a[1], h_a[2], h_b[0], h_b[1], h_b[2], t_a, t_b, d_a, d_b);
 */
 /*
+  int inside_a, inside_b;
   int mode = edge_face_intersect(x1, x2, x3, a, b, h_a, h_b, d_a, d_b,
                                  inside_a, inside_b);
 
+  double u[3],v[3],n[3];
   MathExtra::sub3(x2, x1, u);
   MathExtra::sub3(x3, x1, v);
   MathExtra::cross3(u, v, n);
diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp
index c0f33346bb9f2186d8acba1a1aec9cb659f35d49..c15a909adae028a4cbc9c6c2416958768876659e 100644
--- a/src/RIGID/fix_rigid.cpp
+++ b/src/RIGID/fix_rigid.cpp
@@ -1030,7 +1030,6 @@ void FixRigid::enforce2d()
 void FixRigid::compute_forces_and_torques()
 {
   int i,ibody;
-  double dtfm;
 
   // sum over atoms to get force and torque on rigid body
 
diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp
index 96c44d15b5b0e1861803203e4d20e0d0e052e891..4dceb1b8b4c214aab95999db1ff901df53341062 100644
--- a/src/RIGID/fix_rigid_nh.cpp
+++ b/src/RIGID/fix_rigid_nh.cpp
@@ -591,9 +591,9 @@ void FixRigidNH::initial_integrate(int vflag)
 
 void FixRigidNH::final_integrate()
 {
-  int i,ibody;
+  int ibody;
   double tmp,scale_t[3],scale_r;
-  double dtfm,xy,xz,yz;
+  double dtfm;
   double mbody[3],tbody[3],fquat[4];
 
   double dtf2 = dtf * 2.0;
diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp
index 135a1fb4bdb0e8ee37b8e958bb31e5b6117a1a33..5016d3f1685eed9d809172de4d24344a056c5f75 100644
--- a/src/RIGID/fix_rigid_nh_small.cpp
+++ b/src/RIGID/fix_rigid_nh_small.cpp
@@ -618,7 +618,7 @@ void FixRigidNHSmall::initial_integrate(int vflag)
 
 void FixRigidNHSmall::final_integrate()
 {
-  int i,ibody;
+  int ibody;
   double tmp,scale_t[3],scale_r;
   double dtfm;
   double mbody[3],tbody[3],fquat[4];
diff --git a/src/SNAP/compute_snav_atom.h b/src/SNAP/compute_snav_atom.h
index 2eb9fb804f7420aab541b5995b81e39a2ca83766..7d39786ef98723991b5e35a28c3e219daeb2d8db 100644
--- a/src/SNAP/compute_snav_atom.h
+++ b/src/SNAP/compute_snav_atom.h
@@ -45,7 +45,6 @@ class ComputeSNAVAtom : public Compute {
   double *radelem;
   double *wjelem;
   class SNA** snaptr;
-  double cutmax;
   int quadraticflag;
 };
 
diff --git a/src/SPIN/compute_spin.h b/src/SPIN/compute_spin.h
index 59f0ce2876d3e718d08c88bece84475a74dc04ef..b57876b7a0b93c84424c0234f578e6b89270deb7 100644
--- a/src/SPIN/compute_spin.h
+++ b/src/SPIN/compute_spin.h
@@ -33,7 +33,6 @@ class ComputeSpin : public Compute {
 
  private:
   double kb,hbar;
-  int usecenter;
 
   void allocate();
 };
diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp
index eacfc83b40e0cbf0b83943d9175769dabc12b555..03fc94ae58b6a3cdf64e34cf306a7c8b28eafed5 100644
--- a/src/USER-BOCS/fix_bocs.cpp
+++ b/src/USER-BOCS/fix_bocs.cpp
@@ -625,11 +625,9 @@ void FixBocs::init()
 // NJD MRD 2 functions
 int FixBocs::read_F_table( char *filename, int p_basis_type )
 {
-  char separator = ',';
   FILE *fpi;
   int N_columns = 2, n_entries = 0, i;
   float f1, f2;
-  double n1, n2;
   int test_sscanf;
   double **data = (double **) calloc(N_columns,sizeof(double *));
   char * line = (char *) calloc(200,sizeof(char));
diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp
index 4dae89b4911bcfe69c210bff9d92d9dfbfdb24c5..4a78bb30d2d66c8f748bc5bfabb12de7b59047e0 100644
--- a/src/USER-DPD/fix_rx.cpp
+++ b/src/USER-DPD/fix_rx.cpp
@@ -729,7 +729,7 @@ void FixRX::setup_pre_force(int /*vflag*/)
 
 void FixRX::pre_force(int /*vflag*/)
 {
-  TimerType timer_start = getTimeStamp();
+  //TimerType timer_start = getTimeStamp();
 
   int nlocal = atom->nlocal;
   int nghost = atom->nghost;
@@ -808,7 +808,7 @@ void FixRX::pre_force(int /*vflag*/)
   comm->forward_comm_fix(this);
   if(localTempFlag) delete [] dpdThetaLocal;
 
-  TimerType timer_stop = getTimeStamp();
+  //TimerType timer_stop = getTimeStamp();
 
   double time_ODE = getElapsedTime(timer_localTemperature, timer_ODE);
 
diff --git a/src/USER-INTEL/fix_intel.cpp b/src/USER-INTEL/fix_intel.cpp
index 4c703da8336853fed0a8dfa10a68bcb3cf5faf98..3a67b606323978a043482a01cb60b5b1fb61ce5a 100644
--- a/src/USER-INTEL/fix_intel.cpp
+++ b/src/USER-INTEL/fix_intel.cpp
@@ -724,11 +724,13 @@ void FixIntel::add_oresults(const ft * _noalias const f_in,
   lmp_ft * _noalias const f = (lmp_ft *) lmp->atom->f[0] + out_offset;
   if (atom->torque) {
     if (f_in[1].w)
+    {
       if (f_in[1].w == 1)
         error->all(FLERR,"Bad matrix inversion in mldivide3");
       else
         error->all(FLERR,
                    "Sphere particles not yet supported for gayberne/intel");
+    }
   }
 
   int packthreads;
diff --git a/src/USER-INTEL/fix_nh_intel.cpp b/src/USER-INTEL/fix_nh_intel.cpp
index 44253e8bb0b9c3b5750c6e0a46e2f3c3cf25a7ab..bf4764f10460405807b03db0bf5de9d5f5facbf2 100644
--- a/src/USER-INTEL/fix_nh_intel.cpp
+++ b/src/USER-INTEL/fix_nh_intel.cpp
@@ -464,7 +464,6 @@ void FixNHIntel::nve_x()
 {
   double * _noalias const x = atom->x[0];
   double * _noalias const v = atom->v[0];
-  const double * _noalias const f = atom->f[0];
 
   // x update by full step only for atoms in group
 
diff --git a/src/USER-INTEL/fix_nve_asphere_intel.cpp b/src/USER-INTEL/fix_nve_asphere_intel.cpp
index a83306def5eecd4ab6d108b292cfe83729871273..7eeb8a163557ef9c8521bffea5090a5ff4879601 100644
--- a/src/USER-INTEL/fix_nve_asphere_intel.cpp
+++ b/src/USER-INTEL/fix_nve_asphere_intel.cpp
@@ -81,10 +81,6 @@ void FixNVEAsphereIntel::setup(int vflag)
 
 void FixNVEAsphereIntel::initial_integrate(int /*vflag*/)
 {
-  double dtfm;
-  double inertia[3],omega[3];
-  double *shape,*quat;
-
   AtomVecEllipsoid::Bonus *bonus = avec->bonus;
   int *ellipsoid = atom->ellipsoid;
   double * _noalias const x = atom->x[0];
@@ -94,7 +90,6 @@ void FixNVEAsphereIntel::initial_integrate(int /*vflag*/)
 
   double **angmom = atom->angmom;
   double **torque = atom->torque;
-  double *rmass = atom->rmass;
   int nlocal = atom->nlocal;
   if (igroup == atom->firstgroup) nlocal = atom->nfirst;
 
@@ -143,8 +138,6 @@ void FixNVEAsphereIntel::final_integrate()
 {
   if (neighbor->ago == 0) reset_dt();
 
-  double dtfm;
-
   double * _noalias const v = atom->v[0];
   const double * _noalias const f = atom->f[0];
   double * _noalias const angmom = atom->angmom[0];
diff --git a/src/USER-INTEL/intel_intrinsics_airebo.h b/src/USER-INTEL/intel_intrinsics_airebo.h
index 2c86ad3520ef4d8cced2f680b9ba2a331a2da405..b20f9c8ad13d37d79844250552f972240deb9dc1 100644
--- a/src/USER-INTEL/intel_intrinsics_airebo.h
+++ b/src/USER-INTEL/intel_intrinsics_airebo.h
@@ -2243,7 +2243,7 @@ public:
   FVEC_BINOP(*, mul)
   FVEC_BINOP(/, div)
 
-  VEC_INLINE static void gather_prefetch0(const ivec &idx, const void * mem) {}
+  VEC_INLINE static void gather_prefetch0(const ivec & /*idx*/, const void * /*mem*/) {}
 };
 
 class avec {
diff --git a/src/USER-INTEL/nbin_intel.cpp b/src/USER-INTEL/nbin_intel.cpp
index e071b141fe077895a19801b4c9260f2555a88213..789fa35b429448a5e50651b206d5baea7364dd63 100644
--- a/src/USER-INTEL/nbin_intel.cpp
+++ b/src/USER-INTEL/nbin_intel.cpp
@@ -192,15 +192,10 @@ void NBinIntel::bin_atoms(IntelBuffers<flt_t,acc_t> * buffers) {
 
   // ---------- Bin Atoms -------------
   _fix->start_watch(TIME_HOST_NEIGHBOR);
-  const ATOM_T * _noalias const x = buffers->get_x();
+  //const ATOM_T * _noalias const x = buffers->get_x();
   int * _noalias const atombin = this->_atombin;
   int * _noalias const binpacked = this->_binpacked;
 
-
-  const double sboxlo0 = bboxlo[0] + mbinxlo/bininvx;
-  const double sboxlo1 = bboxlo[1] + mbinylo/bininvy;
-  const double sboxlo2 = bboxlo[2] + mbinzlo/bininvz;
-
   int i, ibin;
 
   for (i = 0; i < mbins; i++) binhead[i] = -1;
diff --git a/src/USER-INTEL/npair_full_bin_ghost_intel.cpp b/src/USER-INTEL/npair_full_bin_ghost_intel.cpp
index 8be2165deb7e1815070f0d47fcde22c8652670cd..74a04f0e7de9dd97197049c7ac9227d2b8ee2516 100644
--- a/src/USER-INTEL/npair_full_bin_ghost_intel.cpp
+++ b/src/USER-INTEL/npair_full_bin_ghost_intel.cpp
@@ -115,7 +115,6 @@ void NPairFullBinGhostIntel::fbi(const int /*offload*/, NeighList * list,
   int nall_t = nall;
   const int aend = nall;
 
-  const int pack_width = _fix->nbor_pack_width();
   const ATOM_T * _noalias const x = buffers->get_x();
   int * _noalias const firstneigh = buffers->firstneigh(list);
   const int e_nall = nall_t;
@@ -155,9 +154,6 @@ void NPairFullBinGhostIntel::fbi(const int /*offload*/, NeighList * list,
   tagint * const molecule = atom->molecule;
   #endif
 
-  int *molindex = atom->molindex;
-  int *molatom = atom->molatom;
-  Molecule **onemols = atom->avec->onemols;
   int moltemplate;
   if (molecular == 2) moltemplate = 1;
   else moltemplate = 0;
@@ -167,8 +163,8 @@ void NPairFullBinGhostIntel::fbi(const int /*offload*/, NeighList * list,
 
   int tnum;
   int *overflow;
-  double *timer_compute;
   #ifdef _LMP_INTEL_OFFLOAD
+  double *timer_compute;
   if (offload) {
     timer_compute = _fix->off_watch_neighbor();
     tnum = buffers->get_off_threads();
@@ -311,7 +307,7 @@ void NPairFullBinGhostIntel::fbi(const int /*offload*/, NeighList * list,
       int * _noalias const ttag = ncachetag + toffs;
 
       // loop over all atoms in other bins in stencil, store every pair
-      int istart, icount, ncount, oldbin = -9999999, lane, max_chunk;
+      int ncount, oldbin = -9999999;
       for (int i = ifrom; i < ito; i++) {
         const flt_t xtmp = x[i].x;
         const flt_t ytmp = x[i].y;
diff --git a/src/USER-INTEL/npair_intel.cpp b/src/USER-INTEL/npair_intel.cpp
index d59cd2304ac70373ffc13db065a0aefabb8e4424..6d4529752ab38dd490680069d627c97a0de22446 100644
--- a/src/USER-INTEL/npair_intel.cpp
+++ b/src/USER-INTEL/npair_intel.cpp
@@ -109,8 +109,8 @@ void NPairIntel::bin_newton(const int /*offload*/, NeighList *list,
 
   int tnum;
   int *overflow;
-  double *timer_compute;
   #ifdef _LMP_INTEL_OFFLOAD
+  double *timer_compute;
   if (offload) {
     timer_compute = _fix->off_watch_neighbor();
     tnum = buffers->get_off_threads();
@@ -265,8 +265,9 @@ void NPairIntel::bin_newton(const int /*offload*/, NeighList *list,
       int * _noalias itjtype;
 
       // loop over all atoms in other bins in stencil, store every pair
-      int istart, icount, ncount, oldbin = -9999999, lane, max_chunk;
+      int istart, icount, ncount, oldbin = -9999999;
       #ifdef LMP_INTEL_3BODY_FAST
+      int lane, max_chunk;
       if (THREE) {
         lane = 0;
         max_chunk = 0;
@@ -579,7 +580,6 @@ void NPairIntel::bin_newton(const int /*offload*/, NeighList *list,
 
         int ns;
         if (THREE) {
-          int alln = n;
           ns = n - pack_offset;
           atombin[i] = ns;
           ns += n2 - pack_offset - maxnbors;
diff --git a/src/USER-MANIFOLD/manifold_sphere.h b/src/USER-MANIFOLD/manifold_sphere.h
index 5d4ae55fdace151347cb7039131d776abb0f9fb7..d9cd46c9c3f5be09dc716222098a78dd9872964d 100644
--- a/src/USER-MANIFOLD/manifold_sphere.h
+++ b/src/USER-MANIFOLD/manifold_sphere.h
@@ -40,7 +40,7 @@ namespace user_manifold {
       nn[2] = 2*x[2];
     }
 
-    virtual void   H( double *x, double h[3][3] )
+    virtual void   H( double * /*x*/, double h[3][3] )
     {
       h[0][1] = h[0][2] = h[1][0] = h[1][2] = h[2][0] = h[2][1] = 0.0;
       h[0][0] = h[1][1] = h[2][2] = 2.0;
diff --git a/src/USER-MGPT/mgpt_linalg.cpp b/src/USER-MGPT/mgpt_linalg.cpp
index 94a4e21ea6a3cb185a556459e30dd98b3cbab0e4..68701037f4a52bbdfeba238004f67d7900d2cb72 100644
--- a/src/USER-MGPT/mgpt_linalg.cpp
+++ b/src/USER-MGPT/mgpt_linalg.cpp
@@ -81,8 +81,8 @@
 #define const
 #endif
 static void transprod_generic(const double * restrict A,
-			      const double * restrict B,
-			      double * restrict C) {
+                              const double * restrict B,
+                              double * restrict C) {
   const int lda = 8,n = mgpt_linalg::matrix_size;
   int i,j,k;
   double s;
@@ -90,15 +90,15 @@ static void transprod_generic(const double * restrict A,
     for(j = 0; j<n; j++) {
       s = 0.0;
       for(k = 1; k<=n; k++)
-	s = s + A[i*lda+k]*B[j*lda+k];
+        s = s + A[i*lda+k]*B[j*lda+k];
       C[i*lda+(j+1)] = s;
     }
 }
 
 static void transtrace3_generic(const double * restrict A,
-				const double * restrict B0,double * restrict tout0,
-				const double * restrict B1,double * restrict tout1,
-				const double * restrict B2,double * restrict tout2) {
+                                const double * restrict B0,double * restrict tout0,
+                                const double * restrict B1,double * restrict tout1,
+                                const double * restrict B2,double * restrict tout2) {
   const int lda = 8,n = mgpt_linalg::matrix_size;
   double t0 = 0.0,t1 = 0.0,t2 = 0.0;
   int i,j;
@@ -116,16 +116,16 @@ static void transtrace3_generic(const double * restrict A,
   *tout2 = t2;
 }
 
-static void transprod_error(const double * restrict A,
-			    const double * restrict B,
-			    double * restrict C) {
+static void transprod_error(const double * restrict /*A*/,
+                            const double * restrict /*B*/,
+                            double * restrict /*C*/) {
   printf("Linear algebra subroutines not initialized (transprod).\n");
   exit(1);
 }
-static void transtrace3_error(const double * restrict A,
-			      const double * restrict B0,double * restrict tout0,
-			      const double * restrict B1,double * restrict tout1,
-			      const double * restrict B2,double * restrict tout2) {
+static void transtrace3_error(const double * restrict /*A*/,
+                              const double * restrict /*B0*/,double * restrict /*tout0*/,
+                              const double * restrict /*B1*/,double * restrict /*tout1*/,
+                              const double * restrict /*B2*/,double * restrict /*tout2*/) {
   printf("Linear algebra subroutines not initialized (transtrace3).\n");
   exit(1);
 }
diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp
index cd7918f4dd3c33764cd086a7ec2dd2191a351da3..8a05a304f1618e6c679cac284819189d70f8afba 100644
--- a/src/USER-MISC/fix_bond_react.cpp
+++ b/src/USER-MISC/fix_bond_react.cpp
@@ -1558,7 +1558,6 @@ void FixBondReact::find_landlocked_atoms(int myrxn)
   // would someone want to change an angle type but not bond or atom types? (etc.) ...hopefully not yet
   for (int i = 0; i < twomol->natoms; i++) {
     if (landlocked_atoms[i][myrxn] == 0) {
-      int twomol_atomi = i+1;
       for (int j = 0; j < twomol->num_bond[i]; j++) {
         int twomol_atomj = twomol->bond_atom[i][j];
         if (landlocked_atoms[twomol_atomj-1][myrxn] == 0) {
diff --git a/src/USER-MOFFF/angle_cosine_buck6d.cpp b/src/USER-MOFFF/angle_cosine_buck6d.cpp
index 352c28be4d773d98079060628c9d37470b947183..3f87aeb7574a00b0fa5b83e8a76d038202fc329d 100644
--- a/src/USER-MOFFF/angle_cosine_buck6d.cpp
+++ b/src/USER-MOFFF/angle_cosine_buck6d.cpp
@@ -56,7 +56,7 @@ AngleCosineBuck6d::~AngleCosineBuck6d()
 
 void AngleCosineBuck6d::compute(int eflag, int vflag)
 {
-  int i,i1,i2,i3,n,type,itype,jtype;
+  int i1,i2,i3,n,type,itype,jtype;
   double delx1,dely1,delz1,delx2,dely2,delz2;
   double eangle,f1[3],f3[3];
   double rsq1,rsq2,r1,r2,c,s,a,a11,a12,a22;
diff --git a/src/USER-MOFFF/improper_inversion_harmonic.cpp b/src/USER-MOFFF/improper_inversion_harmonic.cpp
index 53a7b4729a990c6adacf7b69c8a57558e586e465..9608d58054fa49d99443f915dbe5c78af055d34a 100644
--- a/src/USER-MOFFF/improper_inversion_harmonic.cpp
+++ b/src/USER-MOFFF/improper_inversion_harmonic.cpp
@@ -139,7 +139,6 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
   double upx,upy,upz,upn,rup,umx,umy,umz,umn,rum,wwr;
   double rucb,rudb,rvcb,rvdb,rupupn,rumumn;
 
-  double **x = atom->x;
   double **f = atom->f;
   int nlocal = atom->nlocal;
   int newton_bond = force->newton_bond;
@@ -242,7 +241,7 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
     f[i4][2] += f4[2];
   }
 
-  double rb1x, rb1y, rb1z, rb2x, rb2y, rb2z, rb3x, rb3y, rb3z;
+  double rb3x, rb3y, rb3z;
   if (evflag)
 
     rb3x = vb1x - vb2x;
@@ -253,7 +252,7 @@ void ImproperInversionHarmonic::invang(const int &i1,const int &i2,
              vb3x,vb3y,vb3z,
              vb2x,vb2y,vb2z,
              rb3x,rb3y,rb3z);
- }
+}
 
 /* ---------------------------------------------------------------------- */
 
diff --git a/src/USER-SMD/fix_smd_setvel.h b/src/USER-SMD/fix_smd_setvel.h
index b987a56f6cc1bc9603d72113139f0d27986d3d58..a3e650e682dcecc5eb29d6049ad7b5e9e505fbd6 100644
--- a/src/USER-SMD/fix_smd_setvel.h
+++ b/src/USER-SMD/fix_smd_setvel.h
@@ -56,7 +56,6 @@ class FixSMDSetVel : public Fix {
   int xvar,yvar,zvar,xstyle,ystyle,zstyle;
   double foriginal[3],foriginal_all[3];
   int force_flag;
-  int nlevels_respa;
 
   int maxatom;
   double **sforce;
diff --git a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp
index eba094da533c7944e31f9309299c1830441e3a06..8af12acd99fca684e529f6f06f88043c6874e418 100644
--- a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp
+++ b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp
@@ -149,7 +149,7 @@ void FixSMD_TLSPH_ReferenceConfiguration::pre_exchange() {
 
         if (updateFlag > 0) {
                 if (comm->me == 0) {
-                        printf("**** updating ref config at step: %ld\n", update->ntimestep);
+                        printf("**** updating ref config at step: " BIGINT_FORMAT "\n", update->ntimestep);
                 }
 
                 for (i = 0; i < nlocal; i++) {
diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp
index 7de09a0fa4b9add400543a97a62f2f8a73ad2f74..983f993ae8b617afab02823f2768a3dbb087a3eb 100644
--- a/src/fix_halt.cpp
+++ b/src/fix_halt.cpp
@@ -184,7 +184,7 @@ void FixHalt::end_of_step()
   // print message with ID of fix halt in case multiple instances
 
   char str[128];
-  sprintf(str,"Fix halt %s condition met on step %ld with value %g",
+  sprintf(str,"Fix halt %s condition met on step " BIGINT_FORMAT " with value %g",
           id,update->ntimestep,attvalue);
 
   if (eflag == HARD) {
diff --git a/src/library.cpp b/src/library.cpp
index 18f70051162ba6eb281ce1a65064a78d7aecec59..83e13efd08dd19ebafdf9bb8497e68154b6e7bd6 100644
--- a/src/library.cpp
+++ b/src/library.cpp
@@ -1515,7 +1515,7 @@ void lammps_create_atoms(void *ptr, int n, tagint *id, int *type,
     if (lmp->atom->natoms != natoms_prev + n) {
       char str[128];
       sprintf(str,"Library warning in lammps_create_atoms, "
-              "invalid total atoms %ld %ld",lmp->atom->natoms,natoms_prev+n);
+              "invalid total atoms " BIGINT_FORMAT " %lld",lmp->atom->natoms,natoms_prev+n);
       if (lmp->comm->me == 0)
         lmp->error->warning(FLERR,str);
     }