Merge pull request #1433 from lovell/silence-gcc-warnings

Silence a couple of GCC compiler warnings
This commit is contained in:
John Cupitt 2019-09-20 17:38:10 +01:00 committed by GitHub
commit 5df173dd15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -330,7 +330,7 @@ vips_foreign_load_heif_set_header( VipsForeignLoadHeif *heif, VipsImage *out )
vips_snprintf( name, 256, VIPS_META_EXIF_NAME );
else if( g_ascii_strcasecmp( type, "mime" ) == 0 &&
vips_isprefix( "<x:xmpmeta", (const char *) data ) )
snprintf( name, 256, VIPS_META_XMP_NAME );
vips_snprintf( name, 256, VIPS_META_XMP_NAME );
else
vips_snprintf( name, 256, "heif-%s-%d", type, i );

View File

@ -444,8 +444,8 @@ vips_vsnprintf( char *str, size_t size, const char *format, va_list ap )
*/
if( size > MAX_BUF )
vips_error_exit( "panic: buffer overflow "
"(request to write %d bytes to buffer of %d bytes)",
size, MAX_BUF );
"(request to write %lu bytes to buffer of %d bytes)",
(unsigned long) size, MAX_BUF );
n = vsprintf( buf, format, ap );
if( n > MAX_BUF )
vips_error_exit( "panic: buffer overflow "