fix a couple of clang warnings

This commit is contained in:
John Cupitt 2019-08-09 15:22:56 +01:00
parent 7ef0ae826f
commit 8b1817ddd0
3 changed files with 16 additions and 2 deletions

View File

@ -1721,7 +1721,18 @@ vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out,
va_list ap;
int result;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvarargs"
/* Triggers a clang compiler warning because mode might not be an int.
* I think the warning is harmless for all platforms we care about.
*/
va_start( ap, mode );
g_assert( sizeof( mode ) == sizeof( int ) );
#pragma clang diagnostic pop
result = vips_call_split( "composite2", ap, base, overlay, out, mode );
va_end( ap );

View File

@ -300,7 +300,8 @@ vips_foreign_save_heif_build( VipsObject *object )
return( -1 );
error = heif_context_get_encoder_for_format( heif->ctx,
heif->compression, &heif->encoder );
(enum heif_compression_format) heif->compression,
&heif->encoder );
if( error.code ) {
if( error.code == heif_error_Unsupported_filetype )
vips_error( "heifsave",

View File

@ -638,7 +638,9 @@ int vips_dzsave( VipsImage *in, const char *name, ... )
* @VIPS_FOREIGN_HEIF_COMPRESSION_JPEG: jpeg
* @VIPS_FOREIGN_HEIF_COMPRESSION_AV1: aom
*
* The compression format to use inside a HEIF container.
* The compression format to use inside a HEIF container.
*
* This is assumed to use the same numbering as %heif_compression_format.
*/
typedef enum {
VIPS_FOREIGN_HEIF_COMPRESSION_HEVC = 1,