From: <and...@us...> - 2011-10-27 23:19:48
|
Revision: 12006 http://plplot.svn.sourceforge.net/plplot/?rev=12006&view=rev Author: andrewross Date: 2011-10-27 23:19:42 +0000 (Thu, 27 Oct 2011) Log Message: ----------- Either remove or marked with the UNUSED macro function parameters which are not used. Modified Paths: -------------- trunk/src/pdfutils.c trunk/src/plbox.c trunk/src/plbuf.c trunk/src/plcont.c trunk/src/plcore.c trunk/src/plcvt.c trunk/src/plfill.c trunk/src/plfreetype.c trunk/src/plmap.c trunk/src/plot3d.c trunk/src/plshade.c Modified: trunk/src/pdfutils.c =================================================================== --- trunk/src/pdfutils.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/pdfutils.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -970,7 +970,7 @@ //-------------------------------------------------------------------------- void -plFree2dGrid( PLFLT **f, PLINT nx, PLINT ny ) +plFree2dGrid( PLFLT **f, PLINT nx, PLINT UNUSED( ny ) ) { PLINT i; Modified: trunk/src/plbox.c =================================================================== --- trunk/src/plbox.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plbox.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -782,7 +782,7 @@ static void plxybx( const char *opt, const char *label, PLINT axis, PLFLT wx1, PLFLT wy1, PLFLT wx2, PLFLT wy2, PLFLT vmin_in, PLFLT vmax_in, - PLFLT tick, PLINT nsub, PLINT nolast, PLINT *digits ) + PLFLT tick, PLINT nsub, PLINT UNUSED( nolast ), PLINT *digits ) { static char string[STRING_LEN]; PLINT lb, ld, lf, li, ll, ln, ls, lt, lu, lo; @@ -2369,13 +2369,13 @@ // potential exposure in the PLplot API. // //-------------------------------------------------------------------------- -void plP_default_label_log( PLINT axis, PLFLT value, char *string, PLINT len, void *data ) +void plP_default_label_log( PLINT UNUSED( axis ), PLFLT value, char *string, PLINT len, void * UNUSED( data ) ) { // Exponential, i.e. 10^-1, 10^0, 10^1, etc snprintf( string, (size_t) len, "10#u%d", (int) ROUND( value ) ); } -void plP_default_label_log_fixed( PLINT axis, PLFLT value, char *string, PLINT len, void *data ) +void plP_default_label_log_fixed( PLINT UNUSED( axis ), PLFLT value, char *string, PLINT len, void * UNUSED( data ) ) { // Fixed point, i.e. .1, 1, 10, etc @@ -2394,7 +2394,7 @@ } } -void plP_default_label( PLINT axis, PLFLT value, char *string, PLINT len, void *data ) +void plP_default_label( PLINT UNUSED( axis ), PLFLT value, char *string, PLINT len, void *data ) { PLINT scale, prec; PLINT setpre, precis; Modified: trunk/src/plbuf.c =================================================================== --- trunk/src/plbuf.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plbuf.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -126,7 +126,7 @@ //-------------------------------------------------------------------------- void -plbuf_eop( PLStream *pls ) +plbuf_eop( PLStream * UNUSED( pls ) ) { dbug_enter( "plbuf_eop" ); } @@ -186,7 +186,7 @@ //-------------------------------------------------------------------------- void -plbuf_tidy( PLStream *pls ) +plbuf_tidy( PLStream * UNUSED( pls ) ) { dbug_enter( "plbuf_tidy" ); @@ -456,7 +456,7 @@ //-------------------------------------------------------------------------- static void -rdbuf_init( PLStream *pls ) +rdbuf_init( PLStream * UNUSED( pls ) ) { dbug_enter( "rdbuf_init" ); } @@ -534,7 +534,7 @@ //-------------------------------------------------------------------------- static void -rdbuf_eop( PLStream *pls ) +rdbuf_eop( PLStream * UNUSED( pls ) ) { dbug_enter( "rdbuf_eop" ); } Modified: trunk/src/plcont.c =================================================================== --- trunk/src/plcont.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plcont.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -105,7 +105,7 @@ static int cont3d = 0; static CONT_LINE * -alloc_line( CONT_LEVEL *node ) +alloc_line( void ) { CONT_LINE *line; @@ -139,7 +139,7 @@ } node->level = level; node->next = NULL; - node->line = alloc_line( node ); + node->line = alloc_line( ); return node; } @@ -236,7 +236,7 @@ { if ( currline->npts != 0 ) // not an empty list, allocate new { - currline->next = alloc_line( currlev ); + currline->next = alloc_line( ); currline = currline->next; } @@ -865,7 +865,7 @@ //-------------------------------------------------------------------------- void -pltr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data ) +pltr0( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer UNUSED( pltr_data ) ) { *tx = x; *ty = y; Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plcore.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -1263,7 +1263,7 @@ } static void -grline( short *x, short *y, PLINT npts ) +grline( short *x, short *y, PLINT UNUSED( npts ) ) { char *save_locale = plsave_set_locale(); if ( !plsc->stream_closed ) Modified: trunk/src/plcvt.c =================================================================== --- trunk/src/plcvt.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plcvt.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -211,7 +211,7 @@ // See c_plw3d for a mathematical explanation of the transformation. PLFLT -plP_w3wcx( PLFLT x, PLFLT y, PLFLT z ) +plP_w3wcx( PLFLT x, PLFLT y, PLFLT UNUSED( z ) ) { return ( (PLFLT) ( ( x - plsc->basecx ) * plsc->cxx + ( y - plsc->basecy ) * plsc->cxy ) ); Modified: trunk/src/plfill.c =================================================================== --- trunk/src/plfill.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plfill.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -423,7 +423,7 @@ } void -buildlist( PLINT xp1, PLINT yp1, PLINT xp2, PLINT yp2, PLINT xp3, PLINT yp3, +buildlist( PLINT xp1, PLINT yp1, PLINT xp2, PLINT yp2, PLINT UNUSED( xp3 ), PLINT yp3, PLINT dinc ) { PLINT min_y, max_y; Modified: trunk/src/plfreetype.c =================================================================== --- trunk/src/plfreetype.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plfreetype.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -136,7 +136,7 @@ // Private prototypes for use in this file only -static void FT_PlotChar( PLStream *pls, FT_Data *FT, FT_GlyphSlot slot, int x, int y, short colour ); +static void FT_PlotChar( PLStream *pls, FT_Data *FT, FT_GlyphSlot slot, int x, int y ); static void FT_SetFace( PLStream *pls, PLUNICODE fci ); static PLFLT CalculateIncrement( int bg, int fg, int levels ); @@ -384,7 +384,7 @@ FT_Load_Char( FT->face, text[i], ( FT->smooth_text == 0 ) ? FT_LOAD_MONOCHROME + FT_LOAD_RENDER : FT_LOAD_RENDER | FT_LOAD_FORCE_AUTOHINT ); FT_PlotChar( pls, FT, FT->face->glyph, - ROUND( x / 64.0 ), ROUND( y / 64.0 ), 2 ); // render the text + ROUND( x / 64.0 ), ROUND( y / 64.0 ) ); // render the text x += (int) FT->face->glyph->advance.x; y -= (int) FT->face->glyph->advance.y; @@ -403,7 +403,7 @@ void FT_PlotChar( PLStream *pls, FT_Data *FT, FT_GlyphSlot slot, - int x, int y, short colour ) + int x, int y ) { unsigned char bittest; short i, k, j; @@ -1272,7 +1272,7 @@ // x -= (int) ( ( FT->face->glyph->advance.x >> 6 ) / 2 ); - FT_PlotChar( pls, FT, FT->face->glyph, x, y, (short) pls->icol0 ); // render the text + FT_PlotChar( pls, FT, FT->face->glyph, x, y ); // render the text } Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plmap.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -87,7 +87,7 @@ void plmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, - PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ) + PLFLT minlong, PLFLT maxlong, PLFLT UNUSED( minlat ), PLFLT UNUSED( maxlat ) ) { PLINT wrap, sign; int i, j; Modified: trunk/src/plot3d.c =================================================================== --- trunk/src/plot3d.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plot3d.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -969,7 +969,7 @@ plfplot3dcl( const PLFLT *x, const PLFLT *y, PLF2OPS zops, PLPointer zp, PLINT nx, PLINT ny, PLINT opt, const PLFLT *clevel, PLINT nlevel, - PLINT ixstart, PLINT ixn, const PLINT *indexymin, const PLINT *indexymax ) + PLINT UNUSED( ixstart ), PLINT UNUSED( ixn ), const PLINT * UNUSED( indexymin ), const PLINT * UNUSED( indexymax ) ) { PLFLT cxx, cxy, cyx, cyy, cyz; PLINT init, ix, iy, color, width; Modified: trunk/src/plshade.c =================================================================== --- trunk/src/plshade.c 2011-10-27 23:18:26 UTC (rev 12005) +++ trunk/src/plshade.c 2011-10-27 23:19:42 UTC (rev 12006) @@ -124,10 +124,6 @@ #include "plplotP.h" #include <float.h> -#define MISSING_MIN_DEF (PLFLT) 1.0 -#define MISSING_MAX_DEF (PLFLT) -1.0 - - #define NEG 1 #define POS 8 #define OK 0 @@ -183,7 +179,6 @@ PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), PLPointer c2eval_data, PLINT ( *defined )( PLFLT, PLFLT ), - PLFLT missing_min, PLFLT missing_max, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, @@ -336,7 +331,7 @@ plshade_int( plf2eval1, (PLPointer) a, NULL, NULL, // plc2eval, (PLPointer) &cgrid, - defined, MISSING_MIN_DEF, MISSING_MAX_DEF, nx, ny, xmin, + defined, nx, ny, xmin, xmax, ymin, ymax, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -370,7 +365,7 @@ plshade_int( plf2eval, ( PLPointer ) & grid, NULL, NULL, // plc2eval, (PLPointer) &cgrid, - defined, MISSING_MIN_DEF, MISSING_MAX_DEF, nx, ny, xmin, + defined, nx, ny, xmin, xmax, ymin, ymax, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -400,7 +395,7 @@ PLPointer pltr_data ) { plshade_int( f2eval, f2eval_data, c2eval, c2eval_data, - NULL, MISSING_MIN_DEF, MISSING_MAX_DEF, + NULL, nx, ny, xmin, xmax, ymin, ymax, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -433,7 +428,7 @@ plshade_int( zops->f2eval, zp, NULL, NULL, // plc2eval, (PLPointer) &cgrid, - defined, MISSING_MIN_DEF, MISSING_MAX_DEF, nx, ny, xmin, + defined, nx, ny, xmin, xmax, ymin, ymax, shade_min, shade_max, sh_cmap, sh_color, sh_width, min_color, min_width, max_color, max_width, @@ -451,19 +446,10 @@ // // 4/95 // -// new: missing_min, missing_max -// -// if data <= missing_max and data >= missing_min -// then the data will beconsidered to be missing -// this allows 2nd way to set undefined points (good for ftn) -// if missing feature is not used, set missing_max < missing_min -// // parameters: // // f2eval, f2eval_data: data to plot -// c2eval, c2eval_data: defined mask (not implimented) // defined: defined mask (old API - implimented) -// missing_min, missing_max: yet another way to set data to undefined // nx, ny: array dimensions // xmin, xmax, ymin, ymax: grid coordinates // shade_min, shade_max: shade region with values between ... @@ -482,10 +468,9 @@ static void plshade_int( PLFLT ( *f2eval )( PLINT, PLINT, PLPointer ), PLPointer f2eval_data, - PLFLT ( *c2eval )( PLINT, PLINT, PLPointer ), - PLPointer c2eval_data, + PLFLT ( * c2eval )( PLINT, PLINT, PLPointer ), // unused, but macro doesn't work + PLPointer UNUSED( c2eval_data ), PLINT ( *defined )( PLFLT, PLFLT ), - PLFLT missing_min, PLFLT missing_max, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT shade_min, PLFLT shade_max, @@ -502,6 +487,8 @@ PLFLT x[8], y[8], xp[2], tx, ty; int *c, *c0, *c1; + (void) c2eval; // Cast to void to silence compiler warning about unused parameter + if ( plsc->level < 3 ) { plabort( "plfshade: window must be set up first" ); @@ -1251,7 +1238,7 @@ #define RATIO_SQ 6.0 static PLINT -plctest( PLFLT *x, PLFLT level ) +plctest( PLFLT *x, PLFLT UNUSED( level ) ) { int i, j; double t[4], sorted[4], temp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |