|
From: <and...@us...> - 2013-10-24 23:01:37
|
Revision: 12626
http://sourceforge.net/p/plplot/code/12626
Author: andrewross
Date: 2013-10-24 23:01:26 +0000 (Thu, 24 Oct 2013)
Log Message:
-----------
Fix up various compiler warnings, mostly related to casting and uninitialized variables.
Modified Paths:
--------------
trunk/bindings/f95/plstubs.h
trunk/bindings/f95/scstubs.c
trunk/bindings/java/plplotjavac.i
trunk/bindings/python/plplot_widgetmodule.c
trunk/bindings/python/plplotcmodule.i
trunk/drivers/xfig.c
trunk/examples/c/x33c.c
trunk/examples/c++/x16.cc
trunk/examples/f95/x00f.f90
trunk/examples/f95/x09f.f90
trunk/examples/f95/x27f.f90
trunk/examples/f95/x33f.f90
trunk/src/plfreetype.c
trunk/src/plmap.c
Modified: trunk/bindings/f95/plstubs.h
===================================================================
--- trunk/bindings/f95/plstubs.h 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/bindings/f95/plstubs.h 2013-10-24 23:01:26 UTC (rev 12626)
@@ -208,7 +208,7 @@
#define PLFONT FNAME( PLFONT, plfont )
#define PLFONTLD FNAME( PLFONTLD, plfontld )
#define PLGCHR FNAME( PLGCHR, plgchr )
-#define PLGCMAP1_RANGE FNAME( PLFCMAP1_RANGE, plgcmap1_range )
+#define PLGCMAP1_RANGE FNAME( PLGCMAP1_RANGE, plgcmap1_range )
#define PLGCOL0 FNAME( PLGCOL0, plgcol0 )
#define PLGCOL0A FNAME( PLGCOL0A, plgcol0a )
#define PLGCOLBG FNAME( PLGCOLBG, plgcolbg )
Modified: trunk/bindings/f95/scstubs.c
===================================================================
--- trunk/bindings/f95/scstubs.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/bindings/f95/scstubs.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -106,6 +106,7 @@
void PLGCOLBG( PLINT *r, PLINT *g, PLINT *b );
void PLGCOLBGA( PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
void PLGCOMPRESSION( PLINT *compression );
+void PLGCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color );
void PLGDEV7( char *dev, int length );
void PLGDIDEV( PLFLT *p_mar, PLFLT *p_aspect, PLFLT *p_jx, PLFLT *p_jy );
void PLGDIORI( PLFLT *p_rot );
@@ -198,6 +199,7 @@
void PLSCMAP1LA2( PLBOOL *itype, PLINT *npts, PLFLT *intensity,
PLFLT *coord1, PLFLT *coord2, PLFLT *coord3, PLFLT *a );
void PLSCMAP1N( PLINT *n );
+void PLSCMAP1_RANGE( PLFLT *min_color, PLFLT *max_color );
void PLSCOL0( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b );
void PLSCOL0A( PLINT *icol0, PLINT *r, PLINT *g, PLINT *b, PLFLT *a );
void PLSCOLBG( PLINT *r, PLINT *g, PLINT *b );
@@ -412,10 +414,10 @@
PLFLT **a;
int i, j;
- a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( *n_axes ) );
+ a = (PLFLT **) malloc( sizeof ( PLFLT * ) * ( size_t ) ( *n_axes ) );
for ( i = 0; i < *n_axes; i++ )
{
- a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * n_values[i] );
+ a[i] = (PLFLT *) malloc( sizeof ( PLFLT ) * ( size_t ) n_values[i] );
for ( j = 0; j < n_values[i]; j++ )
{
a[i][j] = values[i + j * ( *n_axes )];
Modified: trunk/bindings/java/plplotjavac.i
===================================================================
--- trunk/bindings/java/plplotjavac.i 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/bindings/java/plplotjavac.i 2013-10-24 23:01:26 UTC (rev 12626)
@@ -197,7 +197,7 @@
setup_array_1d_b( PLBOOL **pa, jboolean *adat, int n )
{
int i;
- *pa = (PLBOOL *) malloc( n * sizeof ( PLBOOL ) );
+ *pa = (PLBOOL *) malloc( ( size_t ) n * sizeof ( PLBOOL ) );
for ( i = 0; i < n; i++ )
{
( *pa )[i] = adat[i] ? 1 : 0;
@@ -210,7 +210,7 @@
setup_array_1d_i( PLINT **pa, jint *adat, int n )
{
int i;
- *pa = (PLINT *) malloc( n * sizeof ( PLINT ) );
+ *pa = (PLINT *) malloc( ( size_t ) n * sizeof ( PLINT ) );
for ( i = 0; i < n; i++ )
{
( *pa )[i] = adat[i];
@@ -223,7 +223,7 @@
setup_array_1d_f( PLFLT **pa, jfloat *adat, int n )
{
int i;
- *pa = (PLFLT *) malloc( n * sizeof ( PLFLT ) );
+ *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) );
for ( i = 0; i < n; i++ )
{
( *pa )[i] = adat[i];
@@ -236,7 +236,7 @@
setup_array_1d_d( PLFLT **pa, jdouble *adat, int n )
{
int i;
- *pa = (PLFLT *) malloc( n * sizeof ( PLFLT ) );
+ *pa = (PLFLT *) malloc( ( size_t ) n * sizeof ( PLFLT ) );
for ( i = 0; i < n; i++ )
{
( *pa )[i] = adat[i];
@@ -251,8 +251,8 @@
{
int i, j;
- *pa = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) );
- ( *pa )[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) );
+ *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) );
+ ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) );
for ( i = 0; i < nx; i++ )
{
@@ -270,8 +270,8 @@
{
int i, j;
- *pa = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) );
- ( *pa )[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) );
+ *pa = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) );
+ ( *pa )[0] = (PLFLT *) malloc( ( size_t ) ( nx * ny ) * sizeof ( PLFLT ) );
for ( i = 0; i < nx; i++ )
{
@@ -292,7 +292,7 @@
#ifdef PL_DOUBLE
x = (double *) dat;
#else
- x = (double *) malloc( n * sizeof ( double ) );
+ x = (double *) malloc( ( size_t ) n * sizeof ( double ) );
for ( i = 0; i < n; i++ )
{
x[i] = (double) dat[i];
@@ -915,8 +915,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -982,8 +982,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1040,8 +1040,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1094,8 +1094,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1178,8 +1178,8 @@
return;
}
- ptr = (PLFLT **) malloc( nx * sizeof ( PLFLT * ) );
- ptr[0] = (PLFLT *) malloc( nx * ny * sizeof ( PLFLT ) );
+ ptr = (PLFLT **) malloc( ( size_t ) nx * sizeof ( PLFLT * ) );
+ ptr[0] = (PLFLT *) malloc( ( size_t ) nx * ny * sizeof ( PLFLT ) );
for ( i = 0; i < nx; i++ )
{
ptr[i] = ptr[0] + i * ny;
@@ -1197,8 +1197,8 @@
ptr = $1;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
for ( i = 0; i < nx; i++ )
{
@@ -1254,8 +1254,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1318,6 +1318,8 @@
jmethodID mapformID;
JNIEnv *cbenvMapform;
+ void mapform_java( PLINT n, PLFLT *x, PLFLT *y );
+
// C mapform callback function which calls the java
// mapform function in a PLCallbackMapform object.
void mapform_java( PLINT n, PLFLT *x, PLFLT *y )
@@ -1567,8 +1569,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1643,8 +1645,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1711,8 +1713,8 @@
int nx = ( *jenv )->GetArrayLength( jenv, $input );
int ny = -1;
int i, j;
- ai = (jobject *) malloc( nx * sizeof ( jobject ) );
- adat = (jPLFLT **) malloc( nx * sizeof ( jPLFLT * ) );
+ ai = (jobject *) malloc( ( size_t ) nx * sizeof ( jobject ) );
+ adat = (jPLFLT **) malloc( ( size_t ) nx * sizeof ( jPLFLT * ) );
( *jenv )->EnsureLocalCapacity( jenv, nx );
@@ -1805,7 +1807,7 @@
// Take a copy of the C string as the typemap is for a non const C string
jmethodID capacityID = ( *jenv )->GetMethodID( jenv, sbufClass, "capacity", "()I" );
jint capacity = ( *jenv )->CallIntMethod( jenv, $input, capacityID );
- $1 = (char *) malloc( capacity + 1 );
+ $1 = (char *) malloc( ( size_t ) ( capacity + 1 ) );
// Zero the original StringBuffer, so we can replace it with the result
setLengthID = ( *jenv )->GetMethodID( jenv, sbufClass, "setLength", "(I)V" );
@@ -1850,7 +1852,7 @@
int i = 0;
size = (int) ( ( *jenv )->GetArrayLength( jenv, $input ) );
$1 = &size;
- $2 = (char **) malloc( ( size + 1 ) * sizeof ( char * ) );
+ $2 = (char **) malloc( ( size_t ) ( size + 1 ) * sizeof ( char * ) );
// make a copy of each string
for ( i = 0; i < size; i++ )
{
@@ -1929,7 +1931,7 @@
printf( "Arrays must be the same length\n" );
return;
}
- $1 = (char **) malloc( Alen * sizeof ( char * ) );
+ $1 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) );
// make a copy of each string
for ( i = 0; i < Alen; i++ )
{
@@ -1975,7 +1977,7 @@
int size = ( *jenv )->GetArrayLength( jenv, $input );
Alen = size;
$1 = size;
- $2 = (char **) malloc( Alen * sizeof ( char * ) );
+ $2 = (char **) malloc( ( size_t ) Alen * sizeof ( char * ) );
// make a copy of each string
for ( i = 0; i < Alen; i++ )
{
Modified: trunk/bindings/python/plplot_widgetmodule.c
===================================================================
--- trunk/bindings/python/plplot_widgetmodule.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/bindings/python/plplot_widgetmodule.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -8,8 +8,11 @@
#ifdef ENABLE_tk
#include <tcl.h>
+#include "pltk.h"
#endif
+void initplplot_widget( void );
+
#define TRY( E ) if ( !( E ) ) return NULL
#ifdef ENABLE_tk
@@ -66,13 +69,13 @@
PLDLLIMPEXP_PLPLOT_WIDGETMODULE void initplplot_widget( void )
{
PyObject *m;
- PyObject *d;
+ //PyObject *d;
import_array();
// Create the module and add the functions
m = Py_InitModule( "plplot_widget", plplot_widget_methods );
- d = PyModule_GetDict( m );
+ PyModule_GetDict( m );
// Check for errors
if ( PyErr_Occurred() )
Modified: trunk/bindings/python/plplotcmodule.i
===================================================================
--- trunk/bindings/python/plplotcmodule.i 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/bindings/python/plplotcmodule.i 2013-10-24 23:01:26 UTC (rev 12626)
@@ -113,8 +113,11 @@
#if SIZEOF_LONG != 4
%wrapper
%{
+
+ PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims );
+
// some really twisted stuff to allow calling a single precision library from python
- PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int type, int mindims, int maxdims )
+ PyArrayObject* myIntArray_ContiguousFromObject( PyObject* in, int PL_UNUSED( type ), int mindims, int maxdims )
{
PyArrayObject* tmp = (PyArrayObject *) PyArray_ContiguousFromObject( in, NPY_PLINT,
mindims, maxdims );
@@ -478,7 +481,7 @@
$2 = PyArray_DIMS( tmp )[0];
$3 = PyArray_DIMS( tmp )[1];
size = $3;
- $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 );
+ $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 );
for ( i = 0; i < $2; i++ )
$1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size );
}
@@ -498,7 +501,7 @@
Xlen = $2 = PyArray_DIMS( tmp )[0];
Ylen = $3 = PyArray_DIMS( tmp )[1];
size = $3;
- $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * $2 );
+ $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) $2 );
for ( i = 0; i < $2; i++ )
$1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size );
}
@@ -518,7 +521,7 @@
Xlen = PyArray_DIMS( tmp )[0];
Ylen = PyArray_DIMS( tmp )[1];
size = Ylen;
- $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
+ $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen );
for ( i = 0; i < Xlen; i++ )
$1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size );
}
@@ -555,7 +558,7 @@
return NULL;
}
size = Ylen;
- $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
+ $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen );
for ( i = 0; i < Xlen; i++ )
$1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size );
}
@@ -578,7 +581,7 @@
return NULL;
}
size = Ylen;
- $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * Xlen );
+ $1 = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) Xlen );
for ( i = 0; i < Xlen; i++ )
$1[i] = ( (PLFLT *) PyArray_DATA( tmp ) + i * size );
}
@@ -608,7 +611,7 @@
if ( !array )
return NULL;
size = Ylen;
- $3 = (double **) malloc( sizeof ( double * ) * Xlen );
+ $3 = (double **) malloc( sizeof ( double * ) * ( size_t ) Xlen );
for ( i = 0; i < Xlen; i++ )
$3[i] = ( (double *) PyArray_DATA( (PyArrayObject *) array ) + i * size );
}
@@ -637,7 +640,7 @@
PyErr_SetString( PyExc_ValueError, "Vectors must be same length." );
return NULL;
}
- $1 = (char **) malloc( sizeof ( char* ) * Alen );
+ $1 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen );
for ( i = 0; i < Alen; i++ )
{
$1[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0];
@@ -659,7 +662,7 @@
return NULL;
Alen = PyArray_DIMS( tmp )[0];
$1 = Alen;
- $2 = (char **) malloc( sizeof ( char* ) * Alen );
+ $2 = (char **) malloc( sizeof ( char* ) * ( size_t ) Alen );
for ( i = 0; i < Alen; i++ )
{
$2[i] = (char *) PyArray_DATA( tmp ) + i * PyArray_STRIDES( tmp )[0];
@@ -719,6 +722,11 @@
static PLcGrid tmpGrid1;
static PLcGrid2 tmpGrid2;
+ PLcGrid* marshal_PLcGrid1( PyObject* input, int isimg );
+ void cleanup_PLcGrid1( void );
+ PLcGrid2* marshal_PLcGrid2( PyObject* input, int isimg );
+ void cleanup_PLcGrid2( void );
+
PLcGrid* marshal_PLcGrid1( PyObject* input, int isimg )
{
// fprintf(stderr, "marshal PLcGrid1\n");
@@ -736,8 +744,8 @@
PyErr_SetString( PyExc_ValueError, "Expected a sequence to two 1D arrays." );
return NULL;
}
- tmpGrid1.nx = PyArray_DIMS( pltr_xg )[0];
- tmpGrid1.ny = PyArray_DIMS( pltr_yg )[0];
+ tmpGrid1.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0];
+ tmpGrid1.ny = ( PLINT ) PyArray_DIMS( pltr_yg )[0];
if ( isimg == 0 )
{
if ( Xlen != tmpGrid1.nx || Ylen != tmpGrid1.ny )
@@ -790,8 +798,8 @@
PyErr_SetString( PyExc_ValueError, "Arrays must be same size." );
return NULL;
}
- tmpGrid2.nx = PyArray_DIMS( pltr_xg )[0];
- tmpGrid2.ny = PyArray_DIMS( pltr_xg )[1];
+ tmpGrid2.nx = ( PLINT ) PyArray_DIMS( pltr_xg )[0];
+ tmpGrid2.ny = ( PLINT ) PyArray_DIMS( pltr_xg )[1];
if ( isimg == 0 )
{
if ( Xlen != tmpGrid2.nx || Ylen != tmpGrid2.ny )
@@ -809,10 +817,10 @@
}
}
size = tmpGrid2.ny;
- tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx );
+ tmpGrid2.xg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx );
for ( i = 0; i < tmpGrid2.nx; i++ )
tmpGrid2.xg[i] = ( (PLFLT *) PyArray_DATA( pltr_xg ) + i * size );
- tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * tmpGrid2.nx );
+ tmpGrid2.yg = (PLFLT **) malloc( sizeof ( PLFLT* ) * ( size_t ) tmpGrid2.nx );
for ( i = 0; i < tmpGrid2.nx; i++ )
tmpGrid2.yg[i] = ( (PLFLT *) PyArray_DATA( pltr_yg ) + i * size );
return &tmpGrid2;
@@ -920,6 +928,22 @@
#define MY_UNBLOCK_THREADS
#endif
+// Function prototypes
+ void do_pltr_callback( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data );
+ PLFLT do_f2eval_callback( PLINT x, PLINT y, PLPointer data );
+ void do_label_callback( PLINT axis, PLFLT value, char *string, PLINT len, PLPointer data );
+ void do_ct_callback( PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data );
+ void do_mapform_callback( PLINT n, PLFLT *x, PLFLT *y );
+ pltr_func marshal_pltr( PyObject* input );
+ void cleanup_pltr( void );
+ ct_func marshal_ct( PyObject* input );
+ void cleanup_ct( void );
+ mapform_func marshal_mapform( PyObject* input );
+ void cleanup_mapform( void );
+ PLPointer marshal_PLPointer( PyObject* input, int isimg );
+ void cleanup_PLPointer( void );
+
+
// This is the callback that gets handed to the C code. It, in turn, calls the Python callback
void do_pltr_callback( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer data )
@@ -1026,7 +1050,6 @@
{
PyObject *pdata, *arglist, *result;
char *pystring;
- PLFLT fresult = 0.0;
// the data argument is acutally a pointer to a python object
if ( data )
@@ -1500,7 +1523,7 @@
}
tmp = PyList_Size( $input );
$1 = &tmp;
- $2 = (char **) malloc( ( tmp + 1 ) * sizeof ( char * ) );
+ $2 = (char **) malloc( ( size_t ) ( tmp + 1 ) * sizeof ( char * ) );
for ( i = 0; i < tmp; i++ )
{
PyObject *s = PyList_GetItem( $input, i );
Modified: trunk/drivers/xfig.c
===================================================================
--- trunk/drivers/xfig.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/drivers/xfig.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -123,7 +123,7 @@
dev = (xfig_Dev *) pls->dev;
- dev->curwid = pls->width < 1 ? 1 : pls->width;
+ dev->curwid = pls->width < 1 ? 1 : (int) pls->width;
dev->firstline = 1;
dev->xold = PL_UNDEFINED;
@@ -390,7 +390,7 @@
case PLSTATE_WIDTH:
flushbuffer( pls );
dev->firstline = 1;
- dev->curwid = pls->width < 1 ? 1 : pls->width;
+ dev->curwid = pls->width < 1 ? 1 : (int) pls->width;
break;
case PLSTATE_COLOR0:
Modified: trunk/examples/c/x33c.c
===================================================================
--- trunk/examples/c/x33c.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/c/x33c.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -257,7 +257,7 @@
15, 1, 1,
low_cap_color, high_cap_color,
cont_color, cont_width,
- n_labels, label_opts, (const char **) &label,
+ n_labels, label_opts, (const char * const *) &label,
n_axes, axis_opts,
ticks, sub_ticks,
n_values_array, (const PLFLT * const *) values_array );
Modified: trunk/examples/c++/x16.cc
===================================================================
--- trunk/examples/c++/x16.cc 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/c++/x16.cc 2013-10-24 23:01:26 UTC (rev 12626)
@@ -168,7 +168,6 @@
PLINT axis_subticks[NUM_AXES] = {
0,
};
- PLFLT filler_values[2] = { 0.0, 1.0 };
#define NUM_LABELS 1
PLINT n_labels = NUM_LABELS;
PLINT label_opts[] = {
Modified: trunk/examples/f95/x00f.f90
===================================================================
--- trunk/examples/f95/x00f.f90 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/f95/x00f.f90 2013-10-24 23:01:26 UTC (rev 12626)
@@ -28,7 +28,7 @@
real(kind=plflt), dimension(NSIZE) :: x, y
real(kind=plflt) :: xmin = 0._plflt, xmax = 1._plflt, ymin = 0._plflt, ymax = 100._plflt
- integer :: i
+ ! integer :: i
! Prepare data to be plotted.
x = arange(0, NSIZE) / real(NSIZE-1,plflt)
Modified: trunk/examples/f95/x09f.f90
===================================================================
--- trunk/examples/f95/x09f.f90 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/f95/x09f.f90 2013-10-24 23:01:26 UTC (rev 12626)
@@ -149,7 +149,7 @@
integer :: i,j
real(kind=plflt) :: xg(xdim, ydim), yg(xdim, ydim), &
z(xdim, ydim), px(PERIMETERPTS), py(PERIMETERPTS), &
- lev(NLEVEL), t, r, theta, delta
+ lev(NLEVEL), r, theta, delta
call plenv(-1._plflt, 1._plflt, -1._plflt, 1._plflt, 0, -2)
call plcol0(1)
Modified: trunk/examples/f95/x27f.f90
===================================================================
--- trunk/examples/f95/x27f.f90 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/f95/x27f.f90 2013-10-24 23:01:26 UTC (rev 12626)
@@ -173,6 +173,12 @@
n = windings*steps+1
+ ! Initialize variables to prevent compiler warnings
+ xmin = 0.0
+ xmax = 0.0
+ ymin = 0.0
+ ymax = 0.0
+
do i = 1,n
phi = dble(i-1) * dphi
phiw = (params(1)-params(2))/params(2)*phi
Modified: trunk/examples/f95/x33f.f90
===================================================================
--- trunk/examples/f95/x33f.f90 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/examples/f95/x33f.f90 2013-10-24 23:01:26 UTC (rev 12626)
@@ -748,9 +748,7 @@
integer :: sub_ticks(1)
real(kind=plflt) :: low_cap_color, high_cap_color
logical :: vertical, ifn
- integer, parameter :: n_axes = 1
character(len=20) :: axis_opts(1)
- integer, parameter :: n_labels = 1
integer :: label_opts(1)
character(len=200) :: labels(1)
character(len=200) :: title
Modified: trunk/src/plfreetype.c
===================================================================
--- trunk/src/plfreetype.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/src/plfreetype.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -225,7 +225,7 @@
{
// FCI in text stream; change font accordingly.
FT_SetFace( pls, text[i] );
- *yy = FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy;
+ *yy = (int) (FT->face->size->metrics.height > -*yy ? -FT->face->size->metrics.height : *yy);
}
else
{
Modified: trunk/src/plmap.c
===================================================================
--- trunk/src/plmap.c 2013-10-24 18:54:19 UTC (rev 12625)
+++ trunk/src/plmap.c 2013-10-24 23:01:26 UTC (rev 12626)
@@ -169,8 +169,8 @@
}
#endif
- bufx = malloc( ncopies * sizeof ( PLFLT* ) );
- bufy = malloc( ncopies * sizeof ( PLFLT* ) );
+ bufx = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) );
+ bufy = malloc( ( size_t ) ncopies * sizeof ( PLFLT* ) );
for ( i = 0; i < ncopies; i++ )
{
bufx[i] = NULL;
@@ -206,8 +206,8 @@
free( bufx[i] );
if ( bufy[i] )
free( bufy[i] );
- bufx[i] = malloc( bufsize * sizeof ( double ) );
- bufy[i] = malloc( bufsize * sizeof ( double ) );
+ bufx[i] = malloc( ( size_t ) bufsize * sizeof ( double ) );
+ bufy[i] = malloc( ( size_t ) bufsize * sizeof ( double ) );
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|