On Fri, Oct 21, 2011 at 01:06:08PM +0100, Andrew Ross wrote:
> On Fri, Oct 21, 2011 at 09:45:47AM +0100, Andrew Ross wrote:
> > 
> > I have had no response to my previous email about handling unused parameter
> > values. I take that as assent to my proposals, so I will try implementing 
> > the UNUSED macro approach, at least for the core library code in src/ .
> > Once there is a concrete implementation in place people might be in a
> > better position to comment.
> 
> I've now implemented this for src/plargs.c as a file with a lot of 
> unused parameters. Please look at, test and comment on the implementation.

Since no-one has protested, I've gone ahead and started to roll this out 
more widely. I've renamed the macro to PL_UNUSED to avoid potential 
namespace clashes, and moved it to plplot.h. This means we can use it in
the examples as well. This has removed a large number of the remaining
warnings.

Alan: I've noticed one issue that you might want to look at. The file
bindings/tcl/plplot_parameters.h is generated by a sed script. It
creates a large string of commands to pass to the tcl interpreter. 
Unfortunately the length of this string (currently 5296) is greater
than the string length which compilers are required to support under
the ISO C99 standard (4096 characters). The length is even less for 
C89. I don't know whether any compilers enforce this limit, but
it would be prudent to avoid this long static string. Possibilities
include splitting it up into several smaller strings, or dynamically
allocating the string (can be any size) and then copying in the 
commands in smaller chunks. I've also changed how this header is 
included slightly. Since it is a static function copies were being
included in a number of object files which didn't actually use
the function.

Andrew

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to