fix a few small compiler warnings

This commit is contained in:
John Cupitt 2022-02-03 14:27:40 +00:00
parent 8c668303f8
commit 0d8056b8c5
4 changed files with 10 additions and 9 deletions

View File

@ -55,6 +55,7 @@
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <vips/vips.h>

View File

@ -2650,9 +2650,9 @@ vips_foreign_save_dz_file_build( VipsObject *object )
*/
if( (p = strrchr( dz->basename, '.' )) ) {
if( !vips_object_argument_isset( object, "container" ) ) {
if( strcasecmp( p + 1, "zip" ) == 0 )
if( g_ascii_strcasecmp( p + 1, "zip" ) == 0 )
dz->container = VIPS_FOREIGN_DZ_CONTAINER_ZIP;
if( strcasecmp( p + 1, "szi" ) == 0 )
if( g_ascii_strcasecmp( p + 1, "szi" ) == 0 )
dz->container = VIPS_FOREIGN_DZ_CONTAINER_SZI;
}

View File

@ -241,7 +241,7 @@ magick_set_number_scenes( ImageInfo *image_info, int scene, int number_scenes )
/* Some IMs must have the string version set as well.
*/
vips_snprintf( page, 256, "%d-%d", scene, scene + number_scenes );
image_info->scenes = strdup( page );
image_info->scenes = g_strdup( page );
}
int
@ -546,7 +546,7 @@ magick_set_number_scenes( ImageInfo *image_info, int scene, int number_scenes )
/* Some IMs must have the string version set as well.
*/
vips_snprintf( page, 256, "%d-%d", scene, scene + number_scenes );
image_info->scenes = strdup( page );
image_info->scenes = g_strdup( page );
#else /*!HAVE_NUMBER_SCENES*/
/* This works with GM 1.2.31 and probably others.
*/
@ -758,13 +758,13 @@ magick_set_vips_profile_cb( Image *image,
char name_text[256];
VipsBuf vips_name = VIPS_BUF_STATIC( name_text );
if( strcasecmp( name, "XMP" ) == 0 )
if( g_ascii_strcasecmp( name, "XMP" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_XMP_NAME );
else if( strcasecmp( name, "IPTC" ) == 0 )
else if( g_ascii_strcasecmp( name, "IPTC" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_IPTC_NAME );
else if( strcasecmp( name, "ICC" ) == 0 )
else if( g_ascii_strcasecmp( name, "ICC" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_ICC_NAME );
else if( strcasecmp( name, "EXIF" ) == 0 )
else if( g_ascii_strcasecmp( name, "EXIF" ) == 0 )
vips_buf_appendf( &vips_name, VIPS_META_EXIF_NAME );
else
vips_buf_appendf( &vips_name, "magickprofile-%s", name );

View File

@ -196,7 +196,7 @@ vips_getpagesize( void )
pagesize = si.dwAllocationGranularity;
#else /*!G_OS_WIN32*/
pagesize = getpagesize();
pagesize = sysconf(_SC_PAGESIZE);
#endif /*G_OS_WIN32*/
#ifdef DEBUG_TOTAL