[devel] Simplified the PNG_UNUSED macro.

This commit is contained in:
Glenn Randers-Pehrson 2011-01-27 12:45:56 -06:00
parent 2774238722
commit 0e15da5b94
3 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ Version 1.5.1beta10 [January 27, 2010]
argument names file_gamma, int_file_gamma, and srgb_intent consistently. argument names file_gamma, int_file_gamma, and srgb_intent consistently.
Version 1.5.1beta11 [January 27, 2011] Version 1.5.1beta11 [January 27, 2011]
Changed PNG_UNUSED from "param=param;" to "(void)(param ? 0 : 0));" (Cosmin) Changed PNG_UNUSED from "param=param;" to "{(void)param;}".
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

View File

@ -3225,7 +3225,7 @@ Version 1.5.1beta10 [January 27, 2010]
argument names file_gamma, int_file_gamma, and srgb_intent consistently. argument names file_gamma, int_file_gamma, and srgb_intent consistently.
Version 1.5.1beta11 [January 27, 2011] Version 1.5.1beta11 [January 27, 2011]
Changed PNG_UNUSED from "param=param;" to "(void)(param ? 0 : 0));" (Cosmin) Changed PNG_UNUSED from "param=param;" to "{(void)param;}".
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

View File

@ -89,13 +89,13 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
* the terminating semicolon. * the terminating semicolon.
*/ */
#ifndef PNG_UNUSED #ifndef PNG_UNUSED
/* Different possiblities being discussed on png-mng-implement, Jan 2011 */ # define PNG_UNUSED(param) {(void)param;}
/* Other possiblities being discussed on png-mng-implement, Jan 2011 */
/* # define PNG_UNUSED(param) param = param; */ /* # define PNG_UNUSED(param) param = param; */
/* # define PNG_UNUSED(param) if(param); */ /* # define PNG_UNUSED(param) if(param); */ /* gcc-4.2 warns about this one */
/* # define PNG_UNUSED(param) if(param){} */ /* # define PNG_UNUSED(param) if(param){} */
/* # define PNG_UNUSED(param) {if(param){}} */ /* # define PNG_UNUSED(param) {if(param){}} */
/* # define PNG_UNUSED(param) {(void)param;} */ /* # define PNG_UNUSED(param) ((void)(param ? 0 : 0)); */
# define PNG_UNUSED(param) ((void)(param ? 0 : 0));
#endif #endif
/* Just a little check that someone hasn't tried to define something /* Just a little check that someone hasn't tried to define something