From: <and...@us...> - 2011-12-03 08:33:11
|
Revision: 12093 http://plplot.svn.sourceforge.net/plplot/?rev=12093&view=rev Author: andrewross Date: 2011-12-03 08:33:04 +0000 (Sat, 03 Dec 2011) Log Message: ----------- Fix up some compiler warnings. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tcl/tclMain.c trunk/bindings/tk/plserver.c trunk/utils/parity_bit_check.c trunk/utils/pltcl.c trunk/utils/pltek.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tcl/tclAPI.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -1166,7 +1166,7 @@ // contour the data. - plcont( (const PLFLT **) zused, nx, ny, + plcont( (const PLFLT * const *) zused, nx, ny, kx, lx, ky, ly, matclev->fdata, nclev, pltr, pltr_data ); @@ -1499,7 +1499,7 @@ // plot the vector data. - plvect( (const PLFLT **) uused, (const PLFLT **) vused, nx, ny, + plvect( (const PLFLT * const *) uused, (const PLFLT * const *) vused, nx, ny, scaling, pltr, pltr_data ); // Now free up any space which got allocated for our coordinate trickery. @@ -1644,7 +1644,7 @@ return TCL_ERROR; } - plmesh( x, y, (const PLFLT **) z, nx, ny, opt ); + plmesh( x, y, (const PLFLT * const *) z, nx, ny, opt ); if ( argc == 7 ) { @@ -1883,7 +1883,7 @@ return TCL_ERROR; } - plmeshc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plmeshc( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2020,7 +2020,7 @@ return TCL_ERROR; } - plot3d( x, y, (const PLFLT **) z, nx, ny, opt, side ); + plot3d( x, y, (const PLFLT * const *) z, nx, ny, opt, side ); if ( argc == 8 ) { @@ -2259,7 +2259,7 @@ return TCL_ERROR; } - plot3dc( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plot3dc( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2498,7 +2498,7 @@ return TCL_ERROR; } - plsurf3d( x, y, (const PLFLT **) z, nx, ny, opt, clev, nlev ); + plsurf3d( x, y, (const PLFLT * const *) z, nx, ny, opt, clev, nlev ); if ( argc == 7 ) { @@ -2853,7 +2853,7 @@ // Now go make the plot. - plshade( (const PLFLT **) zused, nx, ny, NULL, + plshade( (const PLFLT * const *) zused, nx, ny, NULL, xmin, xmax, ymin, ymax, sh_min, sh_max, sh_cmap, sh_col, sh_wid, min_col, min_wid, max_col, max_wid, @@ -3178,7 +3178,7 @@ // Now go make the plot. - plshades( (const PLFLT **) zused, nx, ny, NULL, + plshades( (const PLFLT * const *) zused, nx, ny, NULL, xmin, xmax, ymin, ymax, matclevel->fdata, nlevel, fill_width, cont_color, cont_width, plfill, rect, pltr, pltr_data ); @@ -3689,7 +3689,7 @@ // fprintf(stderr,"Dymin, Dymax: %.17g %.17g\n", Dymin, Dymax); // - c_plimage( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimage( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, Dxmin, Dxmax, Dymin, Dymax ); plFree2dGrid( pidata, nx, ny ); @@ -3795,12 +3795,12 @@ cgrid2.yg[i][j] = yg->fdata[j + i * ( ny + 1 )]; } } - c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr2, (void *) &cgrid2 ); } else { - c_plimagefr( (const PLFLT **) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, + c_plimagefr( (const PLFLT * const *) pidata, nx, ny, xmin, xmax, ymin, ymax, zmin, zmax, valuemin, valuemax, pltr0, NULL ); } @@ -4193,13 +4193,13 @@ nlegend, opt_array, text_offset, text_scale, text_spacing, text_justification, - text_colors, (const char **) text, + text_colors, (const char * const *) text, box_colors, box_patterns, box_scales, box_line_widths, line_colors, line_styles, line_widths, symbol_colors, symbol_scales, - symbol_numbers, (const char **) symbols ); + symbol_numbers, (const char * const *) symbols ); if ( opt_array != NULL ) free( opt_array ); Modified: trunk/bindings/tcl/tclMain.c =================================================================== --- trunk/bindings/tcl/tclMain.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tcl/tclMain.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -74,7 +74,7 @@ // linked into the application. // -//EXTERN int Tcl_LinkVar( ); +EXTERN int Tcl_LinkVar( ); int ( *tclDummyLinkVarPtr )() = Tcl_LinkVar; // Modified: trunk/bindings/tk/plserver.c =================================================================== --- trunk/bindings/tk/plserver.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/bindings/tk/plserver.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -254,7 +254,7 @@ plExitCmd( ClientData PL_UNUSED( clientData ), Tcl_Interp *interp, int argc, char **argv ) { int value = 0; - char *res; + const char *res; // Print error message if one given Modified: trunk/utils/parity_bit_check.c =================================================================== --- trunk/utils/parity_bit_check.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/parity_bit_check.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -9,6 +9,8 @@ main( int argc, char *argv[] ) { int c; + (void) argc; + (void) argv; while ( ( c = getchar() ) != EOF ) { if ( c & 0x80 ) Modified: trunk/utils/pltcl.c =================================================================== --- trunk/utils/pltcl.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/pltcl.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -69,6 +69,9 @@ plExitCmd( ClientData clientData, Tcl_Interp *interp, int argc, char **argv ) { const char *tmp = Tcl_GetStringResult( interp ); + (void) argc; + (void) argv; + (void) clientData; // Print error message if one given if ( tmp != NULL && tmp != '\0' ) @@ -95,6 +98,9 @@ { PLStream *pls; char prompt[80]; + (void) argc; + (void) argv; + (void) clientData; plgpls( &pls ); Modified: trunk/utils/pltek.c =================================================================== --- trunk/utils/pltek.c 2011-12-02 13:31:01 UTC (rev 12092) +++ trunk/utils/pltek.c 2011-12-03 08:33:04 UTC (rev 12093) @@ -68,7 +68,7 @@ start[0] = 0; for ( i = 0; i < MAXPAGES; i++ ) { - nb = fread( buf, 1, BUFSZ, fd ); + nb = (int) fread( buf, 1, BUFSZ, fd ); if ( nb <= 0 ) break; ifirst = 0; @@ -171,7 +171,7 @@ } xtra = '\0'; } - nb = fread( buf, 1, BUFSZ, fd ); + nb = (int) fread( buf, 1, BUFSZ, fd ); if ( nb <= 0 ) break; ifirst = 0; @@ -179,7 +179,7 @@ { if ( buf[j] == '\f' ) { - if ( fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) + if ( (int) fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) { fprintf( stderr, "Error writing to stdout\n" ); exit( 1 ); @@ -196,7 +196,7 @@ xtra = ESC; j--; } - if ( fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) + if ( (int) fwrite( &buf[ifirst], 1, j - ifirst, stdout ) != j - ifirst ) { fprintf( stderr, "Error writing to stdout\n" ); exit( 1 ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |