From: <and...@us...> - 2011-12-02 13:14:12
|
Revision: 12089 http://plplot.svn.sourceforge.net/plplot/?rev=12089&view=rev Author: andrewross Date: 2011-12-02 13:14:05 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Fix up a number of unused variables picked up by compiler warnings. In one case this fixed a bug (# at beginning of rgb value passed as argument to the -bg option was not properly ignored. Modified Paths: -------------- trunk/src/plargs.c trunk/src/plcore.c trunk/src/plgradient.c trunk/src/plstdio.c Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2011-12-02 10:31:07 UTC (rev 12088) +++ trunk/src/plargs.c 2011-12-02 13:14:05 UTC (rev 12089) @@ -1,4 +1,4 @@ -// $Id$ +g/ $Id$ // // Copyright 1993, 1994, 1995 // Maurice LeBrun mj...@di... @@ -1917,7 +1917,7 @@ else rgb = opt_arg; - strncpy( opttmp, opt_arg, OPTMAX - 1 ); + strncpy( opttmp, rgb, OPTMAX - 1 ); opttmp[OPTMAX - 1] = '\0'; if ( strchr( opttmp, '_' ) ) Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2011-12-02 10:31:07 UTC (rev 12088) +++ trunk/src/plcore.c 2011-12-02 13:14:05 UTC (rev 12089) @@ -1925,7 +1925,7 @@ static void calc_diori( void ) { - PLFLT r11, r21, r12, r22, cost, sint; + PLFLT cost, sint; PLFLT x0, y0, lx, ly, aspect; PLFLT affine_result[NAFFINE], affine_left[NAFFINE]; @@ -1948,16 +1948,11 @@ x0 = ( plsc->phyxma + plsc->phyxmi ) / 2.; y0 = ( plsc->phyyma + plsc->phyymi ) / 2.; -// Rotation matrix +// Rotation - r11 = cos( plsc->diorot * PI / 2. ); - r21 = sin( plsc->diorot * PI / 2. ); - r12 = -r21; - r22 = r11; + cost = ABS( cos( plsc->diorot * PI / 2. ) ); + sint = ABS( sin( plsc->diorot * PI / 2. ) ); - cost = ABS( r11 ); - sint = ABS( r21 ); - // Flip aspect ratio as necessary. Grungy but I don't see a better way aspect = plsc->aspect; Modified: trunk/src/plgradient.c =================================================================== --- trunk/src/plgradient.c 2011-12-02 10:31:07 UTC (rev 12088) +++ trunk/src/plgradient.c 2011-12-02 13:14:05 UTC (rev 12089) @@ -77,7 +77,7 @@ else { #define NGRAD 2 - int i, irot_min, irot_max; + int i, irot_min; PLINT _xpoly[PL_MAXPOLY], _ypoly[PL_MAXPOLY]; PLINT *xpoly, *ypoly; PLINT xgrad[NGRAD], ygrad[NGRAD], clpxmi, clpxma, clpymi, clpyma; @@ -92,7 +92,6 @@ xrot_min = xrot; xrot_max = xrot; irot_min = 0; - irot_max = 0; for ( i = 1; i < n; i++ ) { xrot = x[i] * cosangle + y[i] * sinangle; @@ -104,7 +103,6 @@ else if ( xrot > xrot_max ) { xrot_max = xrot; - irot_max = i; } } // xrot_min and xrot_max are the minimum and maximum rotated x Modified: trunk/src/plstdio.c =================================================================== --- trunk/src/plstdio.c 2011-12-02 10:31:07 UTC (rev 12088) +++ trunk/src/plstdio.c 2011-12-02 13:14:05 UTC (rev 12089) @@ -176,7 +176,9 @@ const char *tmpdir; char *template; const char *tmpname = "plplot_XXXXXX"; +#if !defined PL_HAVE_MKSTEMP int flags; +#endif #if defined ( MSDOS ) || defined ( WIN32 ) tmpdir = getenv( "TEMP" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |