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.)

331:   #define THIS ((struct color_struct*)(Pike_fp->current_storage))   #define THISOBJ (Pike_fp->current_object)    - static void init_color_struct(struct object *dummy) + static void init_color_struct(struct object *UNUSED(dummy))   {    THIS->rgb.r=THIS->rgb.g=THIS->rgb.b=0;    THIS->name=NULL;   }    - static void exit_color_struct(struct object *dummy) + static void exit_color_struct(struct object *UNUSED(dummy))   {    if (THIS->name)    {
1514:    RGBL_TO_RGB(cs->rgb,cs->rgbl);   }    - static void image_color__encode( INT32 args ) + static void image_color__encode( INT32 UNUSED(args) )   {    push_int( THIS->rgbl.r );    push_int( THIS->rgbl.g );
1522:    f_aggregate( 3 );   }    - static void image_color__decode( INT32 args ) + static void image_color__decode( INT32 UNUSED(args) )   {    struct svalue *a;    if( TYPEOF(Pike_sp[-1]) != PIKE_T_ARRAY || Pike_sp[-1].u.array->size != 3 )