From: Nicholas Clark Date: Fri, 18 Jan 2008 08:20:13 +0000 (+0000) Subject: Add Weed out needless PERL_UNUSED_ARG to perltodo. It's a good X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d826b294b9e4cbc002b8f9eeaf0e88c52d9ee96;p=p5sagit%2Fp5-mst-13.2.git Add Weed out needless PERL_UNUSED_ARG to perltodo. It's a good "cage cleaner" task. p4raw-id: //depot/perl@32993 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index c6ab065..caa1a83 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -365,6 +365,27 @@ Make F be updated by F. These tasks would need a little C knowledge, but don't need any specific background or experience with XS, or how the Perl interpreter works +=head2 Weed out needless PERL_UNUSED_ARG + +The C code uses the macro C to stop compilers warning about +unused arguments. Often the arguments can't be removed, as there is an +external constraint that determines the prototype of the function, so this +approach is valid. However, there are some cases where C +could be removed. Specifically + +=over 4 + +=item * + +The prototypes of (nearly all) static functions can be changed + +=item * + +Unused arguments generated by short cut macros are wasteful - the short cut +macro used can be changed. + +=back + =head2 Modernize the order of directories in @INC The way @INC is laid out by default, one cannot upgrade core (dual-life)