fix debug build

This commit is contained in:
John Cupitt 2019-10-22 23:07:17 +01:00
parent 60ce52512c
commit e27d6448b1
2 changed files with 11 additions and 9 deletions

View File

@ -74,8 +74,8 @@ vips_switch_gen( VipsRegion *or, void *seq, void *a, void *b,
if( vips_reorder_prepare_many( or->im, ar, r ) )
return( -1 );
g_assert( ar->im->BandFmt == VIPS_FORMAT_UCHAR );
g_assert( ar->im->Bands == 1 );
g_assert( ar[0]->im->BandFmt == VIPS_FORMAT_UCHAR );
g_assert( ar[0]->im->Bands == 1 );
for( i = 0; i < swit->n; i++ ) {
p[i] = VIPS_REGION_ADDR( ar[i], r->left, r->top );

View File

@ -102,7 +102,8 @@ vips_streami_sanity( VipsStreami *streami )
*/
g_assert( streami->read_position >= 0 );
g_assert( streami->read_position < streami->length );
g_assert( streami->read_position < area->length );
g_assert( streami->read_position <
VIPS_AREA( streami->blob )->length );
/* No need for header tracking.
*/
@ -115,10 +116,10 @@ vips_streami_sanity( VipsStreami *streami )
/* No descriptor or filename.
*/
g_assert( stream->descriptor == -1 );
g_assert( stream->close_descriptor == -1 );
g_assert( stream->tracked_descriptor == -1 );
g_assert( !stream->filename );
g_assert( VIPS_STREAM( streami )->descriptor == -1 );
g_assert( VIPS_STREAM( streami )->close_descriptor == -1 );
g_assert( VIPS_STREAM( streami )->tracked_descriptor == -1 );
g_assert( !VIPS_STREAM( streami )->filename );
}
else if( streami->is_pipe ) {
/* In header, read_position must be within header_bytes.
@ -178,8 +179,9 @@ vips_streami_sanity( VipsStreami *streami )
/* Supports minimise, so if descriptor is -1, we must have a
* filename we can reopen.
*/
g_assert( stream->descriptor != -1 ||
(stream->filename && stream->descriptor) );
g_assert( VIPS_STREAM( streami )->descriptor != -1 ||
(VIPS_STREAM( streami )->filename &&
VIPS_STREAM( streami )->descriptor) );
}
}