From: <and...@us...> - 2011-10-28 12:03:06
|
Revision: 12007 http://plplot.svn.sourceforge.net/plplot/?rev=12007&view=rev Author: andrewross Date: 2011-10-28 12:02:58 +0000 (Fri, 28 Oct 2011) Log Message: ----------- Fix a batch more compiler warnings, mostly due to unused parameters. These are now marked with the USED macros if the parameters are never used, or cast to void if their use is conditional through C preprocessor defines. Modified Paths: -------------- trunk/bindings/f95/sccont.c trunk/bindings/f95/scstubs.c trunk/bindings/tcl/pltclgen.tcl trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tcl/tclMatrix.c trunk/bindings/tcl/tclcmd.tpl trunk/bindings/tk/plframe.c trunk/bindings/tk/plr.c trunk/bindings/tk/plserver.c trunk/bindings/tk/plserver.h trunk/bindings/tk/tkMain.c trunk/drivers/cairo.c trunk/drivers/mem.c trunk/drivers/null.c trunk/drivers/ps.c trunk/drivers/psttf.cc trunk/drivers/svg.c trunk/drivers/test-drv-info.c trunk/drivers/tk.c trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets_app.cpp trunk/drivers/wxwidgets_dc.cpp trunk/drivers/xwin.c Modified: trunk/bindings/f95/sccont.c =================================================================== --- trunk/bindings/f95/sccont.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/f95/sccont.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -120,7 +120,7 @@ //-------------------------------------------------------------------------- void -pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data ) +pltr0f( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *UNUSED( pltr_data ) ) { *tx = x + 1.0; *ty = y + 1.0; @@ -353,7 +353,7 @@ //-------------------------------------------------------------------------- void -PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE07( PLFLT *z, PLINT *nx, PLINT *ny, const char *UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -389,7 +389,7 @@ // 1-d transformation void -PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -430,7 +430,7 @@ // 2-d transformation void -PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -473,7 +473,7 @@ } void -PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADE7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *shade_min, PLFLT *shade_max, PLINT *sh_cmap, PLFLT *sh_color, PLINT *sh_width, @@ -516,7 +516,7 @@ //-------------------------------------------------------------------------- void -PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES07( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLINT *lx ) @@ -546,7 +546,7 @@ } void -PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES17( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -583,7 +583,7 @@ } void -PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES27( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined ), PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, @@ -623,7 +623,7 @@ } void -PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char *defined, +PLSHADES7( PLFLT *z, PLINT *nx, PLINT *ny, const char * UNUSED( defined) , PLFLT *xmin, PLFLT *xmax, PLFLT *ymin, PLFLT *ymax, PLFLT *clevel, PLINT *nlevel, PLINT *fill_width, PLINT *cont_color, PLINT *cont_width, PLFLT *ftr, PLINT *lx ) Modified: trunk/bindings/f95/scstubs.c =================================================================== --- trunk/bindings/f95/scstubs.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/f95/scstubs.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -265,7 +265,7 @@ void PLXORMOD( PLBOOL *mode, PLBOOL *status ); static void -pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data ) +pltransformf2c( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer UNUSED( data ) ) { ( *pltransform )( &x, &y, tx, ty ); } @@ -519,7 +519,7 @@ } void -PLGDEV7( char *dev, int length ) +PLGDEV7( char *dev, int UNUSED( length ) ) { c_plgdev( dev ); } @@ -564,7 +564,7 @@ } void -PLGFNAM7( char *fnam, int length ) +PLGFNAM7( char *fnam, int UNUSED( length ) ) { c_plgfnam( fnam ); } @@ -754,7 +754,7 @@ } static void -pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data ) +pllabelfuncf2c( PLINT axis, PLFLT value, char *label, PLINT length, PLPointer UNUSED( data ) ) { int i; @@ -1243,14 +1243,14 @@ } void -PLSLABELFUNC_OFF( PLINT *dummy ) +PLSLABELFUNC_OFF( PLINT * UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); } void -PLSLABELFUNC_OFFa( PLINT *dummy ) +PLSLABELFUNC_OFFa( PLINT * UNUSED( dummy ) ) { pllabelfunc = NULL; c_plslabelfunc( NULL, NULL ); @@ -1364,7 +1364,7 @@ } void -PLSTRANSFORM2( PLINT *dummy ) +PLSTRANSFORM2( PLINT * UNUSED( dummy ) ) { pltransform = NULL; Modified: trunk/bindings/tcl/pltclgen.tcl =================================================================== --- trunk/bindings/tcl/pltclgen.tcl 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/pltclgen.tcl 2011-10-28 12:02:58 UTC (rev 12007) @@ -187,7 +187,7 @@ puts $GENFILE " $argname($i) = atoi(argv\[1+$i\]);" } "PLUNICODE" { - puts $GENFILE " $argname($i) = strtoul(argv\[1+$i\],NULL,10);" + puts $GENFILE " $argname($i) = (PLUNICODE) strtoul(argv\[1+$i\],NULL,10);" } "unsigned int" { puts $GENFILE " $argname($i) = (unsigned int) strtoul(argv\[1+$i\],NULL,10);" Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclAPI.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -71,6 +71,7 @@ static int plstripcCmd( ClientData, Tcl_Interp *, int, const char ** ); static int plslabelfuncCmd( ClientData, Tcl_Interp *, int, const char ** ); void mapform( PLINT n, PLFLT *x, PLFLT *y ); +void labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer data ); PLFLT tclMatrix_feval( PLINT i, PLINT j, PLPointer p ); // @@ -206,7 +207,7 @@ //-------------------------------------------------------------------------- static void -plTclCmd_Init( Tcl_Interp *interp ) +plTclCmd_Init( Tcl_Interp * UNUSED( interp ) ) { register Command *cmdPtr; register CmdInfo *cmdInfoPtr; @@ -328,7 +329,7 @@ //-------------------------------------------------------------------------- static int -loopbackCmd( ClientData clientData, Tcl_Interp *interp, +loopbackCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register Tcl_HashEntry *hPtr; @@ -623,7 +624,7 @@ //-------------------------------------------------------------------------- int -plWait_Until( ClientData clientData, Tcl_Interp *interp, int argc, const char **argv ) +plWait_Until( ClientData UNUSED( clientData ), Tcl_Interp *interp, int UNUSED( argc ), const char **argv ) { int result = 0; @@ -862,7 +863,7 @@ } static int -plcontCmd( ClientData clientData, Tcl_Interp *interp, +plcontCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matf, *matclev; @@ -1198,7 +1199,7 @@ // plvect implementation (based on plcont above) //-------------------------------------------------------------------------- static int -plvectCmd( ClientData clientData, Tcl_Interp *interp, +plvectCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matu, *matv; @@ -1542,7 +1543,7 @@ //-------------------------------------------------------------------------- static int -plmeshCmd( ClientData clientData, Tcl_Interp *interp, +plmeshCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt; @@ -1680,7 +1681,7 @@ //-------------------------------------------------------------------------- static int -plmeshcCmd( ClientData clientData, Tcl_Interp *interp, +plmeshcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -1916,7 +1917,7 @@ //-------------------------------------------------------------------------- static int -plot3dCmd( ClientData clientData, Tcl_Interp *interp, +plot3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, side; @@ -2056,7 +2057,7 @@ //-------------------------------------------------------------------------- static int -plot3dcCmd( ClientData clientData, Tcl_Interp *interp, +plot3dcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2295,7 +2296,7 @@ //-------------------------------------------------------------------------- static int -plsurf3dCmd( ClientData clientData, Tcl_Interp *interp, +plsurf3dCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLINT nx, ny, opt, nlev = 10; @@ -2522,7 +2523,7 @@ //-------------------------------------------------------------------------- static int -plranddCmd( ClientData clientData, Tcl_Interp *interp, +plranddCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc != 1 ) @@ -2545,7 +2546,7 @@ //-------------------------------------------------------------------------- static int -plsetoptCmd( ClientData clientData, Tcl_Interp *interp, +plsetoptCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { if ( argc < 2 || argc > 3 ) @@ -2579,15 +2580,15 @@ // wrapping specifier, as in plcont. So the new command looks like: // // *INDENT-OFF* -// plshade z xmin xmax ymin ymax \ -// sh_min sh_max sh_cmap sh_color sh_width \ -// min_col min_wid max_col max_wid \ +// plshade z xmin xmax ymin ymax +// sh_min sh_max sh_cmap sh_color sh_width +// min_col min_wid max_col max_wid // rect [[pltr x y] | NULL ] [wrap] // *INDENT-ON* //-------------------------------------------------------------------------- static int -plshadeCmd( ClientData clientData, Tcl_Interp *interp, +plshadeCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -2901,14 +2902,14 @@ // So the new command looks like: // // *INDENT-OFF* -// plshades z xmin xmax ymin ymax \ -// clevel, fill_width, cont_color, cont_width\ +// plshades z xmin xmax ymin ymax +// clevel, fill_width, cont_color, cont_width // rect [[pltr x y] | NULL] [wrap] // *INDENT-ON* //-------------------------------------------------------------------------- static int -plshadesCmd( ClientData clientData, Tcl_Interp *interp, +plshadesCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *matPtr, *matz, *mattrx = NULL, *mattry = NULL; @@ -3294,7 +3295,7 @@ //-------------------------------------------------------------------------- static int -plmapCmd( ClientData clientData, Tcl_Interp *interp, +plmapCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT minlong, maxlong, minlat, maxlat; @@ -3361,7 +3362,7 @@ //-------------------------------------------------------------------------- static int -plmeridiansCmd( ClientData clientData, Tcl_Interp *interp, +plmeridiansCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT dlong, dlat, minlong, maxlong, minlat, maxlat; @@ -3431,7 +3432,7 @@ static char *tcl_xform_code = 0; static void -Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data ) +Tcl_transform( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer UNUSED( data ) ) { Tcl_Obj *objx, *objy; int code; @@ -3491,7 +3492,7 @@ //-------------------------------------------------------------------------- static int -plstransformCmd( ClientData clientData, Tcl_Interp *interp, +plstransformCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc == 1 @@ -3509,7 +3510,6 @@ else { size_t len; - const char *data = argc > 2 ? argv[2] : 0; tcl_xform_interp = interp; tcl_xform_procname = plstrdup( argv[1] ); @@ -3530,7 +3530,7 @@ // Processes plgriddata Tcl command. //-------------------------------------------------------------------------- static int -plgriddataCmd( ClientData clientData, Tcl_Interp *interp, +plgriddataCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *arrx, *arry, *arrz, *xcoord, *ycoord, *zvalue; @@ -3630,7 +3630,7 @@ // Processes plimage Tcl command. //-------------------------------------------------------------------------- static int -plimageCmd( ClientData clientData, Tcl_Interp *interp, +plimageCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3706,7 +3706,7 @@ // Very basic! No user-defined interpolation routines //-------------------------------------------------------------------------- static int -plimagefrCmd( ClientData clientData, Tcl_Interp *interp, +plimagefrCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { tclMatrix *zvalue; @@ -3820,7 +3820,7 @@ // Processes plstripc Tcl command. //-------------------------------------------------------------------------- static int -plstripcCmd( ClientData clientData, Tcl_Interp *interp, +plstripcCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { int i; @@ -3930,7 +3930,7 @@ // that handles the custom labels void -labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer data ) +labelform( PLINT axis, PLFLT value, char *string, PLINT string_length, PLPointer UNUSED( data ) ) { int objc; @@ -3972,7 +3972,7 @@ //-------------------------------------------------------------------------- static int -plslabelfuncCmd( ClientData clientData, Tcl_Interp *interp, +plslabelfuncCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { if ( argc < 2 || argc > 3 ) @@ -4120,7 +4120,7 @@ } static int -pllegendCmd( ClientData clientData, Tcl_Interp *interp, +pllegendCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { PLFLT legend_width, legend_height; Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclMain.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -48,8 +48,9 @@ // RCS: @(#) $Id$ // -#include <tcl.h> -#include "plplot.h" +#include "pltcl.h" +// Required for definition of UNUSED macro +#include "plplotP.h" #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5 // From (private) tclInt.h in tcl8.5 @@ -95,6 +96,10 @@ static void plPrepOutputHandler( Tcl_Interp *interp, int code, int tty ); +// Other functio prototypes +void TclSetStartupScriptFileName( char *fileName ); +const char *TclGetStartupScriptFileName( void ); + // These are globally visible and can be replaced void ( *tclErrorHandler )( Tcl_Interp *interp, int code, int tty ) = NULL; @@ -218,7 +223,7 @@ // int PLDLLEXPORT -pltclMain( int argc, const char **argv, char *RcFileName /* OBSOLETE */, +pltclMain( int argc, const char **argv, char * UNUSED( RcFileName ) /* OBSOLETE */, int ( *appInitProc )( Tcl_Interp *interp ) ) { Tcl_Obj *resultPtr; @@ -507,7 +512,7 @@ // static void -plPrepOutputHandler( Tcl_Interp *interp, int code, int tty ) +plPrepOutputHandler( Tcl_Interp *UNUSED( interp ), int UNUSED( code ), int UNUSED( tty ) ) { pltext(); } Modified: trunk/bindings/tcl/tclMatrix.c =================================================================== --- trunk/bindings/tcl/tclMatrix.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclMatrix.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -40,6 +40,7 @@ #include <string.h> #include "pldll.h" #include "tclMatrix.h" +#include "plplotP.h" // Required for definition of UNUSED macro // Cool math macros @@ -120,7 +121,7 @@ //-------------------------------------------------------------------------- int -Tcl_MatrixCmd( ClientData clientData, Tcl_Interp *interp, +Tcl_MatrixCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { register tclMatrix *matPtr; @@ -956,7 +957,7 @@ //-------------------------------------------------------------------------- static void -MatrixPut_f( ClientData clientData, Tcl_Interp* interp, int index, const char *string ) +MatrixPut_f( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -974,7 +975,7 @@ } static void -MatrixPut_i( ClientData clientData, Tcl_Interp* interp, int index, const char *string ) +MatrixPut_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, const char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -987,7 +988,7 @@ } static void -MatrixGet_i( ClientData clientData, Tcl_Interp* interp, int index, char *string ) +MatrixGet_i( ClientData clientData, Tcl_Interp* UNUSED( interp ), int index, char *string ) { tclMatrix *matPtr = (tclMatrix *) clientData; @@ -1011,7 +1012,7 @@ static char * DeleteMatrixVar( ClientData clientData, - Tcl_Interp *interp, char *name1, char *name2, int flags ) + Tcl_Interp * UNUSED( interp ), char * UNUSED( name1 ), char * UNUSED( name2 ), int UNUSED( flags ) ) { tclMatrix *matPtr = (tclMatrix *) clientData; Tcl_CmdInfo infoPtr; Modified: trunk/bindings/tcl/tclcmd.tpl =================================================================== --- trunk/bindings/tcl/tclcmd.tpl 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tcl/tclcmd.tpl 2011-10-28 12:02:58 UTC (rev 12007) @@ -5,7 +5,7 @@ \*--------------------------------------------------------------------------*/ static int -%cmd%Cmd( ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[] ) +%cmd%Cmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char *argv[] ) { <argdecls> Modified: trunk/bindings/tk/plframe.c =================================================================== --- trunk/bindings/tk/plframe.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plframe.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -356,7 +356,7 @@ // int -plFrameCmd( ClientData clientData, Tcl_Interp *interp, +plFrameCmd( ClientData UNUSED( clientData ), Tcl_Interp *interp, int argc, const char **argv ) { Tk_Window new; @@ -1131,7 +1131,7 @@ //-------------------------------------------------------------------------- static void -PlFrameLeaveEH( ClientData clientData, register XEvent *eventPtr ) +PlFrameLeaveEH( ClientData clientData, register XEvent * UNUSED( eventPtr ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -1946,6 +1946,8 @@ } fprintf( stderr, "\n" ); } +#else + (void) argc; // Cast to void to suppress compiler warning about unused parameter #endif // Make sure widget has been initialized before going any further @@ -2613,7 +2615,7 @@ static int Closelink( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) + int UNUSED( argc ), const char ** UNUSED( argv ) ) { register PLRDev *plr = plFramePtr->plr; register PLiodev *iodev = plr->iodev; @@ -2787,7 +2789,7 @@ static int Print( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) + int UNUSED( argc ), const char ** UNUSED( argv ) ) { PLINT ipls; int result = TCL_OK; @@ -2921,8 +2923,8 @@ //-------------------------------------------------------------------------- static int -Redraw( Tcl_Interp *interp, register PlFrame *plFramePtr, - int argc, const char **argv ) +Redraw( Tcl_Interp *UNUSED( interp ), register PlFrame *plFramePtr, + int UNUSED( argc ), const char ** UNUSED( argv ) ) { dbug_enter( "Redraw" ); @@ -3317,7 +3319,7 @@ //-------------------------------------------------------------------------- static void -process_bop( void *clientData, int *skip_driver_bop ) +process_bop( void *clientData, int * UNUSED( skip_driver_bop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; @@ -3332,7 +3334,7 @@ //-------------------------------------------------------------------------- static void -process_eop( void *clientData, int *skip_driver_eop ) +process_eop( void *clientData, int * UNUSED( skip_driver_eop ) ) { register PlFrame *plFramePtr = (PlFrame *) clientData; Modified: trunk/bindings/tk/plr.c =================================================================== --- trunk/bindings/tk/plr.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plr.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -375,7 +375,7 @@ //-------------------------------------------------------------------------- static int -plr_eop( PLRDev *plr ) +plr_eop( PLRDev * UNUSED( plr ) ) { dbug_enter( "plr_eop" ); Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plserver.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -38,6 +38,7 @@ #define NEED_PLDEBUG #include "plserver.h" +#include "plplot_parameters.h" // Application-specific command-line options // Variable declarations @@ -251,7 +252,7 @@ //-------------------------------------------------------------------------- static int -plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +plExitCmd( ClientData UNUSED ( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; Modified: trunk/bindings/tk/plserver.h =================================================================== --- trunk/bindings/tk/plserver.h 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/plserver.h 2011-10-28 12:02:58 UTC (rev 12007) @@ -12,7 +12,6 @@ #include "plDevs.h" #include "pltkd.h" #include "pltcl.h" -#include "plplot_parameters.h" // State info for the rendering code Modified: trunk/bindings/tk/tkMain.c =================================================================== --- trunk/bindings/tk/tkMain.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/bindings/tk/tkMain.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -471,9 +471,7 @@ // ARGSUSED static void -StdinProc( clientData, mask ) -ClientData clientData; // Not used. -int mask; // Not used. +StdinProc( ClientData UNUSED( clientData ), int UNUSED( mask ) ) { #define BUFFER_SIZE 4000 char input[BUFFER_SIZE + 1]; Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/cairo.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -510,7 +510,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_cairo( PLStream *pls, PLINT op ) +void plD_state_cairo( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) { } @@ -2517,7 +2517,7 @@ // Set up for the next page. //-------------------------------------------------------------------------- -void plD_bop_memcairo( PLStream *pls ) +void plD_bop_memcairo( PLStream * UNUSED( pls ) ) { // nothing to do here (we want to preserve the memory as it is) } @@ -2823,7 +2823,7 @@ // End of page. //-------------------------------------------------------------------------- -void plD_eop_extcairo( PLStream *pls ) +void plD_eop_extcairo( PLStream * UNUSED( pls ) ) { // nothing to do here, we leave it to the calling program to display // (or not) the update cairo context. @@ -2880,7 +2880,7 @@ // context, etc... //-------------------------------------------------------------------------- -void plD_tidy_extcairo( PLStream *pls ) +void plD_tidy_extcairo( PLStream * UNUSED( pls ) ) { } Modified: trunk/drivers/mem.c =================================================================== --- trunk/drivers/mem.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/mem.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -161,25 +161,25 @@ } void -plD_bop_mem( PLStream *pls ) +plD_bop_mem( PLStream * UNUSED( pls ) ) { // Nothing to do here } void -plD_tidy_mem( PLStream *pls ) +plD_tidy_mem( PLStream * UNUSED( pls ) ) { // Nothing to do here } void -plD_state_mem( PLStream *pls, PLINT op ) +plD_state_mem( PLStream * UNUSED( pls ), PLINT UNUSED( op ) ) { // Nothing to do here } void -plD_esc_mem( PLStream *pls, PLINT op, void *ptr ) +plD_esc_mem( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void * UNUSED( ptr ) ) { // Nothing to do here } Modified: trunk/drivers/null.c =================================================================== --- trunk/drivers/null.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/null.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -48,7 +48,7 @@ //-------------------------------------------------------------------------- void -plD_init_null( PLStream *pls ) +plD_init_null( PLStream *UNUSED( pls ) ) { int xmin = 0; int xmax = PIXELS_X - 1; @@ -69,37 +69,37 @@ //-------------------------------------------------------------------------- void -plD_line_null( PLStream *pls, short x1a, short y1a, short x2a, short y2a ) +plD_line_null( PLStream * UNUSED( pls ), short UNUSED( x1a ), short UNUSED( y1a ), short UNUSED( x2a ), short UNUSED( y2a ) ) { } void -plD_polyline_null( PLStream *pls, short *xa, short *ya, PLINT npts ) +plD_polyline_null( PLStream *UNUSED( pls ), short *UNUSED( xa ), short *UNUSED( ya ), PLINT UNUSED( npts ) ) { } void -plD_eop_null( PLStream *pls ) +plD_eop_null( PLStream *UNUSED( pls ) ) { } void -plD_bop_null( PLStream *pls ) +plD_bop_null( PLStream *UNUSED( pls ) ) { } void -plD_tidy_null( PLStream *pls ) +plD_tidy_null( PLStream *UNUSED( pls ) ) { } void -plD_state_null( PLStream *pls, PLINT op ) +plD_state_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) { } void -plD_esc_null( PLStream *pls, PLINT op, void *ptr ) +plD_esc_null( PLStream *UNUSED( pls ), PLINT UNUSED( op ), void *UNUSED( ptr ) ) { } Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/ps.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -96,6 +96,9 @@ #ifndef ENABLE_DYNDRIVERS pdt->pl_MenuStr = menustr; pdt->pl_DevName = devnam; +#else + (void) menustr; // Cast to void to silence compiler warnings about unused parameters + (void) devnam; #endif pdt->pl_type = type; pdt->pl_seq = seq; Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/psttf.cc 2011-10-28 12:02:58 UTC (rev 12007) @@ -127,6 +127,9 @@ #ifndef ENABLE_DYNDRIVERS pdt->pl_MenuStr = menustr; pdt->pl_DevName = devnam; +#else + (void) menustr; // Cast to void to silence compiler warnings about unused parameters + (void) devnam; #endif pdt->pl_type = type; pdt->pl_seq = seq; Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/svg.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -373,7 +373,7 @@ // PLStream for each element that is drawn. //-------------------------------------------------------------------------- -void plD_state_svg( PLStream *pls, PLINT op ) +void plD_state_svg( PLStream *UNUSED( pls ), PLINT UNUSED( op ) ) { } Modified: trunk/drivers/test-drv-info.c =================================================================== --- trunk/drivers/test-drv-info.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/test-drv-info.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -39,14 +39,14 @@ // SEGV signal handler RETSIGTYPE -catch_segv( int sig ) +catch_segv( int UNUSED( sig ) ) { fprintf( stderr, "libltdl error: %s\n", lt_dlerror() ); exit( 1 ); } int -main( int argc, char* argv[] ) +main( int UNUSED( argc ), char* argv[] ) { lt_dlhandle dlhand; char sym[SYM_LEN]; Modified: trunk/drivers/tk.c =================================================================== --- trunk/drivers/tk.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/tk.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -1691,7 +1691,7 @@ //-------------------------------------------------------------------------- static int -Abort( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) +Abort( ClientData clientData, Tcl_Interp *UNUSED( interp ), int UNUSED( argc ), char **UNUSED( argv ) ) { PLStream *pls = (PLStream *) clientData; @@ -2127,7 +2127,7 @@ //-------------------------------------------------------------------------- static int -pltk_toplevel( Tk_Window *w, Tcl_Interp *interp ) +pltk_toplevel( Tk_Window *UNUSED( w ), Tcl_Interp *interp ) { static char wcmd[] = "wm withdraw ."; Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -78,6 +78,8 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); +#else + (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } @@ -97,6 +99,8 @@ fprintf( stderr, "\n" ); va_end( args ); fflush( stderr ); +#else + (void) fmt; // Cast to void to silence compiler warnings about unused paraemeter #endif } @@ -1130,8 +1134,6 @@ { // Log_Verbose( "init_freetype_lv1" ); - wxPLDevBase *dev = (wxPLDevBase *) pls->dev; - plD_FreeType_init( pls ); FT_Data *FT = (FT_Data *) pls->FT; Modified: trunk/drivers/wxwidgets_app.cpp =================================================================== --- trunk/drivers/wxwidgets_app.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets_app.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -300,7 +300,7 @@ } size_t index = event.GetId() - wxPL_Save; - if ( ( index >= 0 ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) + if ( ( event.GetId() >= wxPL_Save ) && ( index < sizeof ( dev_entries ) / sizeof ( dev_entry ) ) ) { int width = 800; int height = 600; @@ -412,6 +412,8 @@ else if ( !strcmp( devname, "wxpnm" ) ) type = wxBITMAP_TYPE_PNM; #endif + else + type = wxBITMAP_TYPE_BMP; bool status = bitmap.SaveFile( wxString( filename, *wxConvCurrent ), type ); if ( !status ) Modified: trunk/drivers/wxwidgets_dc.cpp =================================================================== --- trunk/drivers/wxwidgets_dc.cpp 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/wxwidgets_dc.cpp 2011-10-28 12:02:58 UTC (rev 12007) @@ -316,6 +316,7 @@ // The GetPixel method is incredible slow for wxGTK. Therefore we set the colour // always to the background color, since this is the case anyway 99% of the time. PLINT bgr, bgg, bgb; // red, green, blue + (void) x; (void) y; // Cast to void to silence compiler warnings about unused parameters plgcolbg( &bgr, &bgg, &bgb ); // get background color information return RGB( bgr, bgg, bgb ); #else Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2011-10-27 23:19:42 UTC (rev 12006) +++ trunk/drivers/xwin.c 2011-10-28 12:02:58 UTC (rev 12007) @@ -1996,7 +1996,7 @@ //-------------------------------------------------------------------------- static void -LeaveEH( PLStream *pls, XEvent *event ) +LeaveEH( PLStream *pls, XEvent * UNUSED( event ) ) { XwDev *dev = (XwDev *) pls->dev; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |