[PATCH v2 5/5] pnm2png: introduce an use PNGMINUS_UNUSED()
Christian Hesse <[email protected]>
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <[email protected]> |
From: Christian Hesse <[email protected]> PNG_UNUSED() is defined in pngpriv.h, which we do not want to include. Instead define a new macro PNGMINUS_UNUSED() and use that. Signed-off-by: Christian Hesse <[email protected]> --- contrib/pngminus/pnm2png.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/contrib/pngminus/pnm2png.c b/contrib/pngminus/pnm2png.c index 0ea9f7ae6..9bde3bdbe 100644 --- a/contrib/pngminus/pnm2png.c +++ b/contrib/pngminus/pnm2png.c @@ -50,6 +50,16 @@ # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) #endif +#ifndef PNGMINUS_UNUSED +/* Unused formal parameter warnings are silenced using the following macro + * which is expected to have no bad effects on performance (optimizing + * compilers will probably remove it entirely). Note that if you replace + * it with something other than whitespace, you must include the terminating + * semicolon. + */ +# define PNGMINUS_UNUSED(param) (void)param; +#endif + /* function prototypes */ int main (int argc, char *argv[]); @@ -513,7 +523,7 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace, if (png_pixels != (unsigned char*) NULL) free (png_pixels); - PNG_UNUSED(raw); /* Quiet a Coverity defect */ + PNGMINUS_UNUSED(raw); /* Quiet a Coverity defect */ return TRUE; } /* end of pnm2png */ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot