[devel] updated the commentary in pngpriv.h about PNG_UNUSED().
This commit is contained in:
parent
4c0eaee5c6
commit
25d2d47f86
8
ANNOUNCE
8
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.5.1rc02 - January 30, 2011
|
Libpng 1.5.1rc02 - January 31, 2011
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -115,13 +115,13 @@ Version 1.5.1beta11 [January 28, 2011]
|
|||||||
architectures.
|
architectures.
|
||||||
Added transform tests to pngvalid and simplified the arguments.
|
Added transform tests to pngvalid and simplified the arguments.
|
||||||
|
|
||||||
Version 1.5.1rc01 [January 30, 2011]
|
Version 1.5.1rc01 [January 31, 2011]
|
||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
Version 1.5.1rc02 [January 30, 2011]
|
Version 1.5.1rc02 [January 31, 2011]
|
||||||
Added a request in the manual that applications do not use "png_" or
|
Added a request in the manual that applications do not use "png_" or
|
||||||
"PNG_" to begin any of their own symbols.
|
"PNG_" to begin any of their own symbols.
|
||||||
Changed PNG_UNUSED to "(void)param;"
|
Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
6
CHANGES
6
CHANGES
@ -3231,13 +3231,13 @@ Version 1.5.1beta11 [January 28, 2011]
|
|||||||
architectures.
|
architectures.
|
||||||
Added transform tests to pngvalid and simplified the arguments.
|
Added transform tests to pngvalid and simplified the arguments.
|
||||||
|
|
||||||
Version 1.5.1rc01 [January 30, 2011]
|
Version 1.5.1rc01 [January 31, 2011]
|
||||||
No changes.
|
No changes.
|
||||||
|
|
||||||
Version 1.5.1rc02 [January 30, 2011]
|
Version 1.5.1rc02 [January 31, 2011]
|
||||||
Added a request in the manual that applications do not use "png_" or
|
Added a request in the manual that applications do not use "png_" or
|
||||||
"PNG_" to begin any of their own symbols.
|
"PNG_" to begin any of their own symbols.
|
||||||
Changed PNG_UNUSED to "(void)param;"
|
Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
29
pngpriv.h
29
pngpriv.h
@ -83,33 +83,14 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
|
|||||||
# define PNG_MAX_MALLOC_64K
|
# define PNG_MAX_MALLOC_64K
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Unused formal parameter errors are removed using the following macro
|
/* Unused formal parameter warnings are silenced using the following macro
|
||||||
* which is expected to have no bad effects on performance. Note that
|
* which is expected to have no bad effects on performance (optimizing
|
||||||
* if you replace it with something other than whitespace, you must include
|
* compilers will probably remove it entirely). Note that if you replace
|
||||||
* the terminating semicolon. Also note that some of these might not
|
* it with something other than whitespace, you must include the terminating
|
||||||
* work when "param" is a structure, but that is never the case in libpng.
|
* semicolon.
|
||||||
*/
|
*/
|
||||||
#define PNG_UNUSED(param) (void)param;
|
#define PNG_UNUSED(param) (void)param;
|
||||||
|
|
||||||
#if 0 /* Possibilities discussed on png-mng-implement, starting 27 Jan 2011 */
|
|
||||||
#ifndef PNG_UNUSED /* "best" but complex */
|
|
||||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
|
||||||
# define PNG_UNUSED(param) (void)param;
|
|
||||||
#else
|
|
||||||
# define PNG_UNUSED(param)
|
|
||||||
#endif
|
|
||||||
#define PNG_UNUSED(param) {if(param){}}
|
|
||||||
#define PNG_UNUSED(param) param = param; /* What we used before */
|
|
||||||
#define PNG_UNUSED(param) {(void)param;} /* Visual C complains */
|
|
||||||
#define PNG_UNUSED(param) if(param); /* gcc-4.2 complains */
|
|
||||||
#define PNG_UNUSED(param) if(param){} /* more brackets nicer */
|
|
||||||
#define PNG_UNUSED(param) ((void)(param ? 0 : 0)); /* 0:0 might be seen */
|
|
||||||
#define PNG_UNUSED(param) {if(¶m){}} /* gcc-4 complains */
|
|
||||||
#define PNG_UNUSED(param) {if(¶m-¶m){}} /* No comment. */
|
|
||||||
#define PNG_UNUSED(param) /* generates smallest (no) code but emits warning */
|
|
||||||
#endif /* 0 */
|
|
||||||
#endif /* PNG_UNUSED */
|
|
||||||
|
|
||||||
/* Just a little check that someone hasn't tried to define something
|
/* Just a little check that someone hasn't tried to define something
|
||||||
* contradictory.
|
* contradictory.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user