diff --git a/libvips/conversion/composite.cpp b/libvips/conversion/composite.cpp index 5e3f59a7..84ad9cfb 100644 --- a/libvips/conversion/composite.cpp +++ b/libvips/conversion/composite.cpp @@ -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 ); diff --git a/libvips/foreign/heifsave.c b/libvips/foreign/heifsave.c index f72f1953..05a7a516 100644 --- a/libvips/foreign/heifsave.c +++ b/libvips/foreign/heifsave.c @@ -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", diff --git a/libvips/include/vips/foreign.h b/libvips/include/vips/foreign.h index 130adfa4..432394fc 100644 --- a/libvips/include/vips/foreign.h +++ b/libvips/include/vips/foreign.h @@ -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,