Unverified Commit e2765a5c authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

silence compiler warnings about unused arguments and variables and alike

parent b208e39b
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ enum{SCALAR,VECTOR,ARRAY};

ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) :
  Compute(lmp, narg, arg), cutsq(NULL), list(NULL), snap(NULL),
  radelem(NULL), wjelem(NULL), snap_peratom(NULL), snapall(NULL)
  snapall(NULL), snap_peratom(NULL), radelem(NULL), wjelem(NULL),
  snaptr(NULL)
{

  array_flag = 1;
@@ -41,9 +42,6 @@ ComputeSnap::ComputeSnap(LAMMPS *lmp, int narg, char **arg) :

  double rfac0, rmin0;
  int twojmax, switchflag, bzeroflag;
  radelem = NULL;
  wjelem = NULL;

  int ntypes = atom->ntypes;
  int nargmin = 6+2*ntypes;

@@ -413,7 +411,6 @@ void ComputeSnap::compute_array()
    const int typeoffset_local = ndims_peratom*nperdim*itype;
    const int typeoffset_global = nperdim*itype;
    for (int icoeff = 0; icoeff < nperdim; icoeff++) {
      int irow = 1;
      for (int i = 0; i < ntotal; i++) {
        double *snadi = snap_peratom[i]+typeoffset_local;
        int iglobal = atom->tag[i];
+0 −1
Original line number Diff line number Diff line
@@ -112,7 +112,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
  double theta1,t1dir[3],cost1;
  double theta2,t2dir[3],cost2;
  double theta3,t3dir[3],cost3;
  double theta4,theta4p,t4dir[3],cost4;
  double theta7,theta7p,t7dir[3],cost7;
  double theta8,theta8p,t8dir[3],cost8;

+2 −2
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@ void ComputeViscosityCos::remove_bias_all() {
   assume remove_bias() was previously called
------------------------------------------------------------------------- */

void ComputeViscosityCos::restore_bias(int i, double *v) {
void ComputeViscosityCos::restore_bias(int /* i */, double *v) {
  v[0] += vbias[0];
  v[1] += vbias[1];
  v[2] += vbias[2];
@@ -267,7 +267,7 @@ void ComputeViscosityCos::restore_bias(int i, double *v) {
   assume remove_bias_thr() was previously called with the same buffer b
------------------------------------------------------------------------- */

void ComputeViscosityCos::restore_bias_thr(int i, double *v, double *b) {
void ComputeViscosityCos::restore_bias_thr(int /* i */, double *v, double *b) {
  v[0] += b[0];
  v[1] += b[1];
  v[2] += b[2];
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ void FixAccelerateCos::setup(int vflag) {

/* ---------------------------------------------------------------------- */

void FixAccelerateCos::post_force(int vflag) {
void FixAccelerateCos::post_force(int /* vflag */) {
  double **x = atom->x;
  double **f = atom->f;
  int *type = atom->type;
+0 −9
Original line number Diff line number Diff line
@@ -1834,7 +1834,6 @@ void AtomVec::pack_data(double **buf)
void AtomVec::write_data(FILE *fp, int n, double **buf)
{
  int i,j,m,nn,datatype,cols;
  void *pdata;

  for (i = 0; i < n; i++) {
    fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i);
@@ -1983,40 +1982,32 @@ void AtomVec::pack_vel(double **buf)
void AtomVec::write_vel(FILE *fp, int n, double **buf)
{
  int i,j,m,nn,datatype,cols;
  void *pdata;

  for (i = 0; i < n; i++) {
    fprintf(fp,TAGINT_FORMAT,(tagint) ubuf(buf[i][0]).i);

    j = 1;
    for (nn = 1; nn < ndata_vel; nn++) {
      pdata = mdata_vel.pdata[nn];
      datatype = mdata_vel.datatype[nn];
      cols = mdata_vel.cols[nn];
      if (datatype == DOUBLE) {
        if (cols == 0) {
          double *vec = *((double **) pdata);
          fprintf(fp," %-1.16e",buf[i][j++]);
        } else {
          double **array = *((double ***) pdata);
          for (m = 0; m < cols; m++)
            fprintf(fp," %-1.16e",buf[i][j++]);
        }
      } else if (datatype == INT) {
        if (cols == 0) {
          int *vec = *((int **) pdata);
          fprintf(fp," %d",(int) ubuf(buf[i][j++]).i);
        } else {
          int **array = *((int ***) pdata);
          for (m = 0; m < cols; m++)
            fprintf(fp," %d",(int) ubuf(buf[i][j++]).i);
        }
      } else if (datatype == BIGINT) {
        if (cols == 0) {
          bigint *vec = *((bigint **) pdata);
          fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i);
        } else {
          bigint **array = *((bigint ***) pdata);
          for (m = 0; m < cols; m++)
            fprintf(fp," " BIGINT_FORMAT,(bigint) ubuf(buf[i][j++]).i);
        }