fix more compiler warnings

This commit is contained in:
John Cupitt 2016-01-26 16:41:03 +00:00
parent db20d70495
commit 1f93efd65d
7 changed files with 26 additions and 8 deletions

View File

@ -220,12 +220,10 @@ vips_arrayjoin_build( VipsObject *object )
int left, top;
int width, height;
/* Keep clang quiet about used-before-set.
/* Compiler warnings.
*/
left = 0;
top = 0;
width = 0;
height = 0;
switch( join->halign ) {
case VIPS_ALIGN_LOW:

View File

@ -184,7 +184,6 @@ mat2vips_get_header( matvar_t *var, VipsImage *im )
int i;
width = 1;
height = 1;
bands = 1;
switch( var->rank ) {
case 3:

View File

@ -1534,8 +1534,7 @@ tiff2vips_strip_read_interleaved( ReadTiff *rtiff, int y, tdata_t buf )
}
}
else {
if( tiff2vips_strip_read( rtiff->tiff,
y / rtiff->rows_per_strip, buf ) )
if( tiff2vips_strip_read( rtiff->tiff, strip, buf ) )
return( -1 );
}

View File

@ -945,6 +945,11 @@ vips_get_tile_size( VipsImage *im,
{
const int nthr = vips_concurrency_get();
/* Compiler warnings.
*/
*tile_width = 1;
*tile_height = 1;
/* Pick a render geometry.
*/
switch( im->dhint ) {

View File

@ -84,6 +84,10 @@ vips_countlines_build( VipsObject *object )
if( VIPS_OBJECT_CLASS( vips_countlines_parent_class )->build( object ) )
return( -1 );
/* Compiler warnings.
*/
nolines = 1;
switch( countlines->direction ) {
case VIPS_DIRECTION_HORIZONTAL:
if( !(t[0] = vips_image_new_matrixv( 1, 2, -1.0, 1.0 )) ||

View File

@ -129,6 +129,15 @@ vips_mosaic_build( VipsObject *object )
default:
g_assert_not_reached();
/* Compiler warnings.
*/
dx0 = 0;
dy0 = 0;
scale1 = 1;
angle1 = 1;
dx1 = 0;
dy1 = 0;
}
g_object_set( mosaic,

View File

@ -223,8 +223,12 @@ vips_resize_build( VipsObject *object )
vips_info( class->nickname, "residual affine %g x %g",
hresidual, vresidual );
vips_info( class->nickname, "%s interpolation",
VIPS_OBJECT_GET_CLASS( resize->interpolate )->nickname );
if( resize->interpolate ) {
const char *nickname =
VIPS_OBJECT_GET_CLASS( resize->interpolate )->nickname;
vips_info( class->nickname, "%s interpolation", nickname );
}
if( vips_affine( in, &t[3], hresidual, 0, 0, vresidual,
"interpolate", resize->interpolate,