Commit a404da02 authored by Richard Berger's avatar Richard Berger
Browse files

Use LMP_UNUSED_PARAM macro instead of existing workarounds

parent 71bc72ec
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -992,7 +992,6 @@ void Image::compute_SSAO()

void Image::write_JPG(FILE *fp)
{
  (void)(fp); // suppress unused parameter warning
#ifdef LAMMPS_JPEG
  struct jpeg_compress_struct cinfo;
  struct jpeg_error_mgr jerr;
@@ -1018,6 +1017,8 @@ void Image::write_JPG(FILE *fp)

  jpeg_finish_compress(&cinfo);
  jpeg_destroy_compress(&cinfo);
#else
  LMP_UNUSED_PARAM(fp);
#endif
}

@@ -1025,7 +1026,6 @@ void Image::write_JPG(FILE *fp)

void Image::write_PNG(FILE *fp)
{
  (void)(fp); // suppress unused parameter warning
#ifdef LAMMPS_PNG
  png_structp png_ptr;
  png_infop info_ptr;
@@ -1076,6 +1076,8 @@ void Image::write_PNG(FILE *fp)

  png_destroy_write_struct(&png_ptr, &info_ptr);
  delete[] row_pointers;
#else
  LMP_UNUSED_PARAM(fp);
#endif
}

+3 −1
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ typedef int bigint;
#include "lmpwindows.h"
#endif

#define LMP_UNUSED_PARAM(x) (void)x
// suppress unused parameter warning

#define LMP_UNUSED_PARAM(x) (void)(x)

#endif