mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17]Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added missing
parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian Hesse).
This commit is contained in:
parent
031a3815ae
commit
780d38b87d
6
ANNOUNCE
6
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.7.0beta90 - August 19, 2017
|
||||
Libpng 1.7.0beta90 - August 28, 2017
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -1439,7 +1439,9 @@ Version 1.7.0beta89 [August 19, 2017]
|
||||
Check for 0 return from png_get_rowbytes() in contrib/pngminus/*.c to stop
|
||||
some Coverity issues (162705, 162706, and 162707).
|
||||
|
||||
Version 1.7.0beta90 [August 19, 2017]
|
||||
Version 1.7.0beta90 [August 28, 2017]
|
||||
Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added missing
|
||||
parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian Hesse).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
4
CHANGES
4
CHANGES
@ -5740,7 +5740,9 @@ Version 1.7.0beta89 [August 19, 2017]
|
||||
Check for 0 return from png_get_rowbytes() in contrib/pngminus/*.c to stop
|
||||
some Coverity issues (162705, 162706, and 162707).
|
||||
|
||||
Version 1.7.0beta90 [August 19, 2017]
|
||||
Version 1.7.0beta90 [August 28, 2017]
|
||||
Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added missing
|
||||
parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian Hesse).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
@ -5,7 +5,8 @@
|
||||
* version 1.0 - 1999.10.15 - First version.
|
||||
* 1.1 - 2017.04.22 - Add buffer-size check (Glenn Randers-Pehrson)
|
||||
* 1.2 - 2017.08.24 - Fix potential overflow in buffer-size check
|
||||
(Glenn Randers-Pehrson)
|
||||
* (Glenn Randers-Pehrson)
|
||||
* 1.3 - 2017.08.28 - Add PNGMINUS_UNUSED (Christian Hesse)
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
@ -44,6 +45,7 @@
|
||||
#define PNG_DEBUG 0
|
||||
#endif
|
||||
|
||||
|
||||
#include "png.h"
|
||||
|
||||
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
|
||||
@ -51,6 +53,14 @@
|
||||
# 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).
|
||||
*/
|
||||
# define PNGMINUS_UNUSED(param) (void)param
|
||||
#endif
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
int main (int argc, char *argv[]);
|
||||
@ -443,7 +453,7 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file,
|
||||
if (png_pixels != (unsigned char*) NULL)
|
||||
free (png_pixels);
|
||||
|
||||
PNG_UNUSED(raw) /* to quiet a Coverity defect */
|
||||
PNGMINUS_UNUSED(raw); /* to quiet a Coverity defect */
|
||||
return TRUE;
|
||||
|
||||
} /* end of source */
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* version 1.2 - 2017.04.22 - Add buffer-size check
|
||||
* 1.3 - 2017.08.24 - Fix potential overflow in buffer-size check
|
||||
* (Glenn Randers-Pehrson)
|
||||
* 1.4 - 2017.08.28 - Add PNGMINUS_UNUSED (Christian Hesse)
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby granted,
|
||||
@ -50,6 +51,15 @@
|
||||
# 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).
|
||||
*/
|
||||
# define PNGMINUS_UNUSED(param) (void)param
|
||||
#endif
|
||||
|
||||
|
||||
/* function prototypes */
|
||||
|
||||
int main (int argc, char *argv[]);
|
||||
@ -376,7 +386,7 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
|
||||
/* row_bytes is the width x number of channels x (bit-depth / 8) */
|
||||
row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
|
||||
|
||||
if ((row_bytes == 0 || (size_t)height > ((size_t)(-1))/(size_t)row_bytes)
|
||||
if ((row_bytes == 0 || (size_t)height > ((size_t)(-1))/(size_t)row_bytes))
|
||||
{
|
||||
/* too big */
|
||||
return FALSE;
|
||||
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user