Use LMP_UNUSED_PARAM macro instead of existing workarounds

This commit is contained in:
Richard Berger
2018-08-27 22:36:38 -04:00
parent 71bc72ec13
commit a404da02d5
2 changed files with 7 additions and 3 deletions

View File

@ -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
}

View File

@ -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