From: <and...@us...> - 2011-10-14 08:03:58
|
Revision: 11969 http://plplot.svn.sourceforge.net/plplot/?rev=11969&view=rev Author: andrewross Date: 2011-10-14 08:03:51 +0000 (Fri, 14 Oct 2011) Log Message: ----------- A few minor fixes for gcc warnings in some of the drivers. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/svg.c trunk/drivers/tkwin.c Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/ps.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -90,7 +90,7 @@ static void ps_dispatch_init_helper( PLDispatchTable *pdt, - char *menustr, char *devnam, + const char *menustr, const char *devnam, int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/svg.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -81,12 +81,12 @@ // Functions for writing XML SVG tags to a file -static void svg_open( SVG *, char * ); +static void svg_open( SVG *, const char * ); static void svg_open_end( SVG * ); -static void svg_attr_value( SVG *, char *, char * ); -static void svg_attr_values( SVG *, char *, char *, ... ); -static void svg_close( SVG *, char * ); -static void svg_general( SVG *, char * ); +static void svg_attr_value( SVG *, const char *, const char * ); +static void svg_attr_values( SVG *, const char *, const char *, ... ); +static void svg_close( SVG *, const char * ); +static void svg_general( SVG *, const char * ); static void svg_indent( SVG * ); static void svg_stroke_width( PLStream * ); static void svg_stroke_color( PLStream * ); @@ -564,7 +564,7 @@ void proc_str( PLStream *pls, EscText *args ) { char plplot_esc; - short static which_clip = 0; + static short which_clip = 0; short i; short totalTags = 1; short ucs4Len = args->unicode_array_len; @@ -893,7 +893,7 @@ // Used to open a new XML expression, sets the indent level appropriately //-------------------------------------------------------------------------- -void svg_open( SVG *aStream, char *tag ) +void svg_open( SVG *aStream, const char *tag ) { svg_indent( aStream ); fprintf( aStream->svgFile, "<%s\n", tag ); @@ -921,7 +921,7 @@ // i.e. foo="bar" //-------------------------------------------------------------------------- -void svg_attr_value( SVG *aStream, char *attribute, char *value ) +void svg_attr_value( SVG *aStream, const char *attribute, const char *value ) { svg_indent( aStream ); fprintf( aStream->svgFile, "%s=\"%s\"\n", attribute, value ); @@ -938,10 +938,10 @@ // //-------------------------------------------------------------------------- -void svg_attr_values( SVG *aStream, char *attribute, char *format, ... ) +void svg_attr_values( SVG *aStream, const char *attribute, const char *format, ... ) { va_list ap; - char *p, *sval; + const char *p, *sval; int ival; double dval; @@ -989,7 +989,7 @@ // Used to close a XML expression, sets the indent level appropriately //-------------------------------------------------------------------------- -void svg_close( SVG *aStream, char *tag ) +void svg_close( SVG *aStream, const char *tag ) { aStream->svgIndent -= 2; svg_indent( aStream ); @@ -1009,7 +1009,7 @@ // Used to print any text into the svgFile //-------------------------------------------------------------------------- -void svg_general( SVG *aStream, char *text ) +void svg_general( SVG *aStream, const char *text ) { svg_indent( aStream ); fprintf( aStream->svgFile, "%s", text ); Modified: trunk/drivers/tkwin.c =================================================================== --- trunk/drivers/tkwin.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/tkwin.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -391,7 +391,7 @@ // but we will actually 'free' it later ourselves, and therefore // need to own the memory. // - pls->FileName = strdup( TkGetDefaultScreenName( NULL, NULL ) ); + pls->FileName = plstrdup( TkGetDefaultScreenName( NULL, NULL ) ); } tkwd->display = pls->plPlotterPtr->display; #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |