fix some clang warnings

This commit is contained in:
John Cupitt 2014-01-09 14:26:58 +00:00
parent 765c4b0c1d
commit c81654ad93
14 changed files with 26 additions and 18 deletions

View File

@ -1,3 +1,6 @@
9/1/14 started 7.36.6
- fix some clang compiler warnings
20/11/13 started 7.36.5
- better cache sizing in unbuffered sequential mode
- allow larger tile_size in dzsave

View File

@ -2,7 +2,7 @@
# also update the version number in the m4 macros below
AC_INIT([vips], [7.36.5], [vipsip@jiscmail.ac.uk])
AC_INIT([vips], [7.36.6], [vipsip@jiscmail.ac.uk])
# required for gobject-introspection
AC_PREREQ(2.62)
@ -17,7 +17,7 @@ AC_CONFIG_MACRO_DIR([m4])
# user-visible library versioning
m4_define([vips_major_version], [7])
m4_define([vips_minor_version], [36])
m4_define([vips_micro_version], [5])
m4_define([vips_micro_version], [6])
m4_define([vips_version],
[vips_major_version.vips_minor_version.vips_micro_version])
@ -37,7 +37,7 @@ VIPS_VERSION_STRING=$VIPS_VERSION-`date`
# binary interface changes not backwards compatible?: reset age to 0
LIBRARY_CURRENT=35
LIBRARY_REVISION=5
LIBRARY_REVISION=6
LIBRARY_AGE=0
# patched into include/vips/version.h

View File

@ -48,7 +48,8 @@
static VipsFormatFlags
analyze_flags( const char *filename )
{
return( vips_foreign_flags( "analyzeload", filename ) );
return( (VipsFormatFlags)
vips_foreign_flags( "analyzeload", filename ) );
}
static int

View File

@ -74,7 +74,8 @@ exr_flags( const char *name )
im_filename_split( name, filename, mode );
return( vips_foreign_flags( "openexrload", filename ) );
return( (VipsFormatFlags)
vips_foreign_flags( "openexrload", filename ) );
}
static int

View File

@ -110,7 +110,8 @@ openslide_flags( const char *name )
im_filename_split( name, filename, mode );
return( vips_foreign_flags( "openslideload", filename ) );
return( (VipsFormatFlags)
vips_foreign_flags( "openslideload", filename ) );
}
static int

View File

@ -63,7 +63,8 @@ isppm( const char *filename )
static VipsFormatFlags
ppm_flags( const char *filename )
{
return( vips_foreign_flags( "ppmload", filename ) );
return( (VipsFormatFlags)
vips_foreign_flags( "ppmload", filename ) );
}
static const char *ppm_suffs[] = { ".ppm", ".pgm", ".pbm", ".pfm", NULL };

View File

@ -132,7 +132,8 @@ tiff_flags( const char *name )
im_filename_split( name, filename, mode );
return( vips_foreign_flags( "tiffload", filename ) );
return( (VipsFormatFlags)
vips_foreign_flags( "tiffload", filename ) );
}
static int

View File

@ -512,14 +512,14 @@ vips__ppm_isppm( const char *filename )
/* ppm flags function.
*/
VipsFormatFlags
VipsForeignFlags
vips__ppm_flags( const char *filename )
{
VipsFormatFlags flags;
VipsForeignFlags flags;
flags = 0;
if( isppmmmap( filename ) )
flags |= VIPS_FORMAT_PARTIAL;
flags |= VIPS_FOREIGN_PARTIAL;
return( flags );
}

View File

@ -38,7 +38,7 @@ extern "C" {
int vips__ppm_header( const char *name, VipsImage *out );
int vips__ppm_load( const char *name, VipsImage *out );
int vips__ppm_isppm( const char *filename );
VipsFormatFlags vips__ppm_flags( const char *filename );
VipsForeignFlags vips__ppm_flags( const char *filename );
extern const char *vips__ppm_suffs[];
int vips__ppm_save( VipsImage *in, const char *filename,

View File

@ -1108,7 +1108,7 @@ vips2rad_put_data_block( VipsRegion *region, Rect *area, void *a )
for( i = 0; i < area->height; i++ ) {
VipsPel *p = VIPS_REGION_ADDR( region, 0, area->top + i );
if( fwritecolrs( p, area->width, write->fout ) )
if( fwritecolrs( (COLR *) p, area->width, write->fout ) )
return( -1 );
}

View File

@ -186,7 +186,7 @@ read_image( Read *read, VipsImage *out )
{
VipsImage **t = (VipsImage **)
vips_object_local_array( VIPS_OBJECT( out ), 3 );
guint64 length;
gint64 length;
void *data;
int fd;
webp_decoder decoder;

View File

@ -90,8 +90,8 @@ void *vips_foreign_map( const char *base,
typedef enum /*< flags >*/ {
VIPS_FOREIGN_NONE = 0, /* No flags set */
VIPS_FOREIGN_PARTIAL = 1, /* Lazy read OK (eg. tiled tiff) */
VIPS_FOREIGN_SEQUENTIAL = 2, /* Top-to-bottom lazy read OK */
VIPS_FOREIGN_BIGENDIAN = 4, /* Most-significant byte first */
VIPS_FOREIGN_BIGENDIAN = 2, /* Most-significant byte first */
VIPS_FOREIGN_SEQUENTIAL = 4, /* Top-to-bottom lazy read OK */
VIPS_FOREIGN_ALL = 7 /* All flags set */
} VipsForeignFlags;

View File

@ -238,7 +238,7 @@ typedef struct _VipsImage {
* gint64 so that we can guarantee to work even on systems with
* strange ideas about large files.
*/
guint64 sizeof_header;
gint64 sizeof_header;
/* If this is a large disc image, don't map the whole thing, instead
* have a set of windows shared between the regions active on the

View File

@ -14,8 +14,8 @@ vips_foreign_flags_get_type( void )
static const GFlagsValue values[] = {
{VIPS_FOREIGN_NONE, "VIPS_FOREIGN_NONE", "none"},
{VIPS_FOREIGN_PARTIAL, "VIPS_FOREIGN_PARTIAL", "partial"},
{VIPS_FOREIGN_SEQUENTIAL, "VIPS_FOREIGN_SEQUENTIAL", "sequential"},
{VIPS_FOREIGN_BIGENDIAN, "VIPS_FOREIGN_BIGENDIAN", "bigendian"},
{VIPS_FOREIGN_SEQUENTIAL, "VIPS_FOREIGN_SEQUENTIAL", "sequential"},
{VIPS_FOREIGN_ALL, "VIPS_FOREIGN_ALL", "all"},
{0, NULL, NULL}
};