Branch: Tag:

2014-12-04

2014-12-04 19:23:02 by Jonas Walldén <jonasw@roxen.com>

Wrap unused parameters in UNUSED(), and debug-only parameters in DEBUGUSED(), to cut
down on compiler warnings. The macro also renames parameters to catch accidental use.
(There are more places to clean up but I don't want to modify code that isn't compiling
on my machine.)

548:   #endif   #endif    + /* Suppress compiler warnings for unused parameters if possible. The mangling of +  argument name is required to catch when an unused argument later is used without +  removing the annotation. */ + #ifndef UNUSED + # ifdef __GNUC__ + # define UNUSED(x) PIKE_CONCAT(x,_UNUSED) __attribute__((unused)) + # else + # define UNUSED(x) PIKE_CONCAT(x,_UNUSED) + # endif + #endif + #ifndef DEBUGUSED + # ifdef PIKE_DEBUG + # define DEBUGUSED(x) x + # else + # define DEBUGUSED(x) UNUSED(x) + # endif + #endif +    /* PMOD_EXPORT exports a function / variable vfsh. */   #ifndef PMOD_EXPORT   # if defined (__NT__) && defined (USE_DLL)