fix gcc4.6 warnings

This commit is contained in:
John Cupitt 2011-10-18 17:11:04 +01:00
parent d3739d3638
commit c600338366
6 changed files with 675 additions and 650 deletions

View File

@ -3563,9 +3563,8 @@ namespace cimg_library {
}
if (name) {
if (argc>0) {
int k=0,i;
int k=0;
while (k<argc && cimg::strcmp(argv[k],name)) k++;
i=k;
res=(k++==argc?defaut:(k==argc?argv[--k]:argv[k]));
} else res = defaut;
if (visu && usage) std::fprintf(stderr," %s%-8s%s = %-12s : %s%s%s\n",

View File

@ -117,7 +117,7 @@ im_resize_linear( IMAGE *in, IMAGE *out, int X, int Y )
PEL *q, *p;
int ils, ips, ies; /* Input and output line, pel and */
int ols, ops, oes; /* element sizes */
int ols, oes; /* element sizes */
if( im_iocheck( in, out ) )
return( -1 );
@ -143,7 +143,6 @@ im_resize_linear( IMAGE *in, IMAGE *out, int X, int Y )
ies = IM_IMAGE_SIZEOF_ELEMENT( in );
ols = IM_IMAGE_SIZEOF_LINE( out );
ops = IM_IMAGE_SIZEOF_PEL( out );
oes = IM_IMAGE_SIZEOF_ELEMENT( out );
/* buffer lines

View File

@ -283,7 +283,7 @@ vips_operation_set_valist_required( VipsOperation *operation, va_list ap )
else if( (argument_class->flags & VIPS_ARGUMENT_REQUIRED) &&
(argument_class->flags & VIPS_ARGUMENT_OUTPUT) &&
!argument_instance->assigned ) {
void *arg;
void *arg __attribute((unused));
/* Output args are all pointers to places to write
* results. Skip here, we use these during the output

View File

@ -479,7 +479,7 @@ im_read_dmask( const char *filename )
double sc, off;
int xs, ys;
DOUBLEMASK *out;
int x, y, i, size;
int x, y, i;
char buf[MAX_LINE];
if( !(fp = im__file_open_read( filename, NULL, TRUE )) )
@ -496,7 +496,6 @@ im_read_dmask( const char *filename )
}
out->scale = sc;
out->offset = off;
size = xs * ys;
for( i = 0, y = 0; y < ys; y++ ) {
char *p;

View File

@ -78,7 +78,6 @@ im__clinear( TIE_POINTS *points )
double scale, angle, xdelta, ydelta;
int *xref, *yref, *xsec, *ysec;
double *dx, *dy, *dev;
double resx, resy;
xref = &points->x_reference[0];
yref = &points->y_reference[0];
@ -96,8 +95,6 @@ im__clinear( TIE_POINTS *points )
return( -1 );
}
resx = 0.0;
resy = 0.0;
for( i = 0; i < points->nopoints; i++ ) {
sx1 += xref[i];
sx1x1 += xref[i] * xref[i];
@ -112,9 +109,6 @@ im__clinear( TIE_POINTS *points )
sy2 += ysec[i];
}
resx = fabs( sx1-sx2 )/points->nopoints;
resy = fabs( sy1-sy2 )/points->nopoints;
mat[0][0] = sx1x1 + sy1y1;
mat[0][1] = 0;
mat[0][2] = sx1;

File diff suppressed because it is too large Load Diff