Alan W. Irwin wrote:
On 2009-08-26 11:12+0200 Mark de Wever wrote:
I also noticed with gcc -Wall there are a lot of unused variables in
plplot, if wanted I could provide a patch which removes those variables.
Yes, please.
Sorry hit the send button too soon, this time with the patch attached.
Regards,
Mark de Wever
Index: src/plbuf.c
===================================================================
--- src/plbuf.c (revision 10351)
+++ src/plbuf.c (working copy)
@@ -850,7 +850,6 @@
PLUNICODE(fci);
EscText text;
PLFLT xform[4];
- PLUNICODE* unicode;
text.xform = xform;
Index: src/plargs.c
===================================================================
--- src/plargs.c (revision 10351)
+++ src/plargs.c (working copy)
@@ -1606,7 +1606,7 @@
{
const char *rgb;
char *color_field, *alpha_field;
- long bgcolor, r, g, b, length;
+ long bgcolor, r, g, b;
PLFLT a;
/* Strip off leading "#" (TK-ism) if present. */
Index: src/plarc.c
===================================================================
--- src/plarc.c (revision 10351)
+++ src/plarc.c (working copy)
@@ -105,7 +105,6 @@
{
PLINT xscl[2], yscl[2];
PLINT clpxmi, clpxma, clpymi, clpyma;
- PLFLT orientation_offset, orientation;
arc_struct *arc_info;
/* TODO: For now, only unrotated plots use the driver-accelerated path. */
Index: drivers/cairo.c
===================================================================
--- drivers/cairo.c (revision 10351)
+++ drivers/cairo.c (working copy)
@@ -598,13 +598,11 @@
void text_end_cairo(PLStream *pls, EscText *args)
{
int textXExtent, textYExtent;
- char *textWithPangoMarkup;
- PLFLT rotation, shear, stride, cos_rot, sin_rot, cos_shear, sin_shear,
diorot_rad;
+ PLFLT rotation, shear, stride, cos_rot, sin_rot, cos_shear, sin_shear;
cairo_matrix_t *cairoTransformMatrix;
cairo_font_options_t *cairoFontOptions;
PangoContext *context;
PangoLayout *layout;
- PangoFontDescription *fontDescription;
PLCairo *aStream;
aStream = (PLCairo *)pls->dev;
@@ -686,7 +684,6 @@
void proc_str(PLStream *pls, EscText *args)
{
- int i;
float fontSize;
int textXExtent, textYExtent;
char *textWithPangoMarkup;
@@ -695,7 +692,6 @@
cairo_font_options_t *cairoFontOptions;
PangoContext *context;
PangoLayout *layout;
- PangoFontDescription *fontDescription;
PLCairo *aStream;
aStream = (PLCairo *)pls->dev;
@@ -897,7 +893,6 @@
void open_span_tag(char *pangoMarkupString, PLUNICODE fci, float fontSize, int
upDown)
{
- int i;
unsigned char fontFamily, fontStyle, fontWeight;
char openTag[TAG_LEN];
@@ -1432,7 +1427,6 @@
void plD_init_xcairo(PLStream *pls)
{
char plotTitle[40];
- XGCValues values;
PLCairo *aStream;
/* Setup the PLStream and the font lookup table. */
Index: examples/c/x32c.c
===================================================================
--- examples/c/x32c.c (revision 10351)
+++ examples/c/x32c.c (working copy)
@@ -61,12 +61,12 @@
/* outliers */
static PLFLT outx[] = { 3.5, 6.5 };
static PLFLT outy[] = { 0.89, 1.09 };
-
+/*
static PLFLT pos[] = {0.0, 0.25, 0.5, 0.75, 1.0};
static PLFLT red[] = {0.0, 0.25, 0.5, 1.0, 1.0};
static PLFLT green[] = {1.0, 0.5, 0.5, 0.5, 1.0};
static PLFLT blue[] = {1.0, 1.0, 0.5, 0.25, 0.0};
-
+*/
/* Parse and process command line arguments */
(void) plparseopts(&argc, argv, PL_PARSE_FULL);
Index: examples/c/x03c.c
===================================================================
--- examples/c/x03c.c (revision 10351)
+++ examples/c/x03c.c (working copy)
@@ -14,7 +14,7 @@
int
main(int argc, const char *argv[])
{
- int i, j;
+ int i;
PLFLT dtr, theta, dx, dy, r, offset;
char text[4];
static PLFLT x0[361], y0[361];
Index: examples/c++/x03.cc
===================================================================
--- examples/c++/x03.cc (revision 10351)
+++ examples/c++/x03.cc (working copy)
@@ -47,7 +47,7 @@
x03::x03( int argc, const char ** argv ) {
- int i, j;
+ int i;
char text[4];
PLFLT dtr, theta, dx, dy, r, offset;
Index: examples/c++/x16.cc
===================================================================
--- examples/c++/x16.cc (revision 10351)
+++ examples/c++/x16.cc (working copy)
@@ -48,10 +48,6 @@
static int ny;
static int exclude;
const static int PERIMETERPTS;
-
- // calculated constants and array that depends on them
- PLFLT xspa;
- PLFLT ypsa;
public:
static PLFLT tr[];
@@ -173,11 +169,6 @@
pls->Alloc2dGrid(&z,nx,ny);
pls->Alloc2dGrid(&w,nx,ny);
- // calculated constants and array that depends on them
- PLFLT xspa = 2./(nx-1);
- PLFLT yspa = 2./(ny-1);
-
-
// Set up data array
for (i = 0; i < nx; i++) {
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel