From 5569022dbda7f4d6e692ad2de75157a765db9df7 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Fri, 23 Sep 2022 14:37:35 +0100 Subject: [PATCH] use G_GNUC_* attribute system Instead of our own compiler attr thing. see https://github.com/libvips/libvips/issues/2871 --- ChangeLog | 3 +- libvips/arithmetic/complex.c | 4 +- libvips/include/vips/almostdeprecated.h | 12 +- libvips/include/vips/arithmetic.h | 220 ++++++++++++------------ libvips/include/vips/buf.h | 2 +- libvips/include/vips/colour.h | 72 ++++---- libvips/include/vips/connection.h | 2 +- libvips/include/vips/conversion.h | 130 +++++++------- libvips/include/vips/convolution.h | 26 +-- libvips/include/vips/create.h | 54 +++--- libvips/include/vips/dbuf.h | 2 +- libvips/include/vips/dispatch.h | 2 +- libvips/include/vips/draw.h | 28 +-- libvips/include/vips/error.h | 6 +- libvips/include/vips/foreign.h | 200 ++++++++++----------- libvips/include/vips/freqfilt.h | 10 +- libvips/include/vips/generate.h | 4 +- libvips/include/vips/header.h | 2 +- libvips/include/vips/histogram.h | 24 +-- libvips/include/vips/image.h | 14 +- libvips/include/vips/internal.h | 4 +- libvips/include/vips/morphology.h | 12 +- libvips/include/vips/mosaicing.h | 14 +- libvips/include/vips/object.h | 6 +- libvips/include/vips/operation.h | 2 +- libvips/include/vips/resample.h | 32 ++-- libvips/include/vips/type.h | 2 +- libvips/include/vips/util.h | 10 +- libvips/include/vips/vips.h | 16 -- libvips/include/vips/vips7compat.h | 2 +- 30 files changed, 450 insertions(+), 467 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ea610f8..9535f07a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,11 +7,10 @@ master - jp2ksave defaults to chroma subsample off, and jp2 write - don't minimise sink_screen input after expose ... improves caching during interactive use -- move tiff jp2k and jpeg decompress outside the lock - require libjxl 0.7+ - add "interlace" option to GIF save [dloebl] - magick load sets "magick-format" metadata [aksdb] -- add ".pnm", save as image format [ewelot] +- add ".pnm" save [ewelot] - threaded tiff jp2k and jpeg decompress - improve speed and efficiency of animated WebP write [dloebl] diff --git a/libvips/arithmetic/complex.c b/libvips/arithmetic/complex.c index 3795505d..71aacf57 100644 --- a/libvips/arithmetic/complex.c +++ b/libvips/arithmetic/complex.c @@ -654,7 +654,7 @@ vips_complexget_build( VipsObject *object ) } #define GETLOOP( TYPE, OP ) { \ - TYPE *p __attribute__ ((unused)) = (TYPE *) in[0]; \ + TYPE *p G_GNUC_UNUSED = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ @@ -663,7 +663,7 @@ vips_complexget_build( VipsObject *object ) } #define CGETLOOP( TYPE, OP ) { \ - TYPE *p __attribute__ ((unused)) = (TYPE *) in[0]; \ + TYPE *p G_GNUC_UNUSED = (TYPE *) in[0]; \ TYPE *q = (TYPE *) out; \ \ for( x = 0; x < sz; x++ ) { \ diff --git a/libvips/include/vips/almostdeprecated.h b/libvips/include/vips/almostdeprecated.h index 2730aabf..1f3df78b 100644 --- a/libvips/include/vips/almostdeprecated.h +++ b/libvips/include/vips/almostdeprecated.h @@ -134,18 +134,18 @@ int im_copy_from( IMAGE *in, IMAGE *out, im_arch_type architecture ); */ VIPS_DEPRECATED_FOR(vips_error) void im_errormsg( const char *fmt, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_DEPRECATED_FOR(vips_verror) void im_verrormsg( const char *fmt, va_list ap ); VIPS_DEPRECATED_FOR(vips_error_system) void im_errormsg_system( int err, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_DEPRECATED_FOR(g_info) void im_diagnostics( const char *fmt, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_DEPRECATED_FOR(g_warning) void im_warning( const char *fmt, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_DEPRECATED int im_iterate( VipsImage *im, @@ -384,14 +384,14 @@ int im_smear( IMAGE *im, int ix, int iy, VipsRect *r ); VIPS_DEPRECATED_FOR(g_warning) void vips_warn( const char *domain, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_DEPRECATED_FOR(g_warning) void vips_vwarn( const char *domain, const char *fmt, va_list ap ); VIPS_DEPRECATED void vips_info_set( gboolean info ); VIPS_DEPRECATED_FOR(g_info) void vips_info( const char *domain, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_DEPRECATED_FOR(g_info) void vips_vinfo( const char *domain, const char *fmt, va_list ap ); diff --git a/libvips/include/vips/arithmetic.h b/libvips/include/vips/arithmetic.h index 4ec907a9..8fc520e9 100644 --- a/libvips/include/vips/arithmetic.h +++ b/libvips/include/vips/arithmetic.h @@ -193,376 +193,376 @@ typedef enum { VIPS_API int vips_add( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sum( VipsImage **in, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_subtract( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_multiply( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_divide( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_linear( VipsImage *in, VipsImage **out, const double *a, const double *b, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_linear1( VipsImage *in, VipsImage **out, double a, double b, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_remainder( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_remainder_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_remainder_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_invert( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_abs( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sign( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_round( VipsImage *in, VipsImage **out, VipsOperationRound round, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_floor( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_ceil( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rint( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_math( VipsImage *in, VipsImage **out, VipsOperationMath math, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sin( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cos( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tan( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_asin( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_acos( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_atan( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_exp( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_exp10( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_log( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_log10( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sinh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cosh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tanh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_asinh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_acosh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_atanh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_complex( VipsImage *in, VipsImage **out, VipsOperationComplex cmplx, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_polar( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rect( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_conj( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_complex2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationComplex2 cmplx, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cross_phase( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_complexget( VipsImage *in, VipsImage **out, VipsOperationComplexget get, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_real( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_imag( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_complexform( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_relational( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationRelational relational, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_equal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_notequal( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_less( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lesseq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_more( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_moreeq( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_relational_const( VipsImage *in, VipsImage **out, VipsOperationRelational relational, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_equal_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_notequal_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_less_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lesseq_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_more_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_moreeq_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_relational_const1( VipsImage *in, VipsImage **out, VipsOperationRelational relational, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_equal_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_notequal_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_less_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lesseq_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_more_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_moreeq_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_boolean( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationBoolean boolean, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_andimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_orimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_eorimage( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rshift( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_boolean_const( VipsImage *in, VipsImage **out, VipsOperationBoolean boolean, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_andimage_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_orimage_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_eorimage_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lshift_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rshift_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_boolean_const1( VipsImage *in, VipsImage **out, VipsOperationBoolean boolean, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_andimage_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_orimage_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_eorimage_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_lshift_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rshift_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_math2( VipsImage *left, VipsImage *right, VipsImage **out, VipsOperationMath2 math2, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pow( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_wop( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_atan2( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_math2_const( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pow_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_wop_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_atan2_const( VipsImage *in, VipsImage **out, const double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_math2_const1( VipsImage *in, VipsImage **out, VipsOperationMath2 math2, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pow_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_wop_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_atan2_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_avg( VipsImage *in, double *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_deviate( VipsImage *in, double *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_min( VipsImage *in, double *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_max( VipsImage *in, double *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_stats( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_measure( VipsImage *in, VipsImage **out, int h, int v, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_find_trim( VipsImage *in, int *left, int *top, int *width, int *height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_getpoint( VipsImage *in, double **vector, int *n, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_find( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_find_ndim( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_find_indexed( VipsImage *in, VipsImage *index, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hough_line( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hough_circle( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_project( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_profile( VipsImage *in, VipsImage **columns, VipsImage **rows, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/buf.h b/libvips/include/vips/buf.h index 00bf6018..acc0bb90 100644 --- a/libvips/include/vips/buf.h +++ b/libvips/include/vips/buf.h @@ -81,7 +81,7 @@ VIPS_API gboolean vips_buf_appends( VipsBuf *buf, const char *str ); VIPS_API gboolean vips_buf_appendf( VipsBuf *buf, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API gboolean vips_buf_vappendf( VipsBuf *buf, const char *fmt, va_list ap ); VIPS_API diff --git a/libvips/include/vips/colour.h b/libvips/include/vips/colour.h index 8bec4382..cf73dac1 100644 --- a/libvips/include/vips/colour.h +++ b/libvips/include/vips/colour.h @@ -112,111 +112,111 @@ gboolean vips_colourspace_issupported( const VipsImage *image ); VIPS_API int vips_colourspace( VipsImage *in, VipsImage **out, VipsInterpretation space, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LabQ2sRGB( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rad2float( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_float2rad( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LabS2LabQ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LabQ2LabS( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LabQ2Lab( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Lab2LabQ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LCh2Lab( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Lab2LCh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Yxy2Lab( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_CMC2XYZ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Lab2XYZ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_XYZ2Lab( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_XYZ2scRGB( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_scRGB2sRGB( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_scRGB2BW( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sRGB2scRGB( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_scRGB2XYZ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_HSV2sRGB( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sRGB2HSV( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LCh2CMC( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_CMC2LCh( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_XYZ2Yxy( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Yxy2XYZ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_LabS2Lab( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_Lab2LabS( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_CMYK2XYZ( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_XYZ2CMYK( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_profile_load( const char *name, VipsBlob **profile, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_icc_present( void ); VIPS_API int vips_icc_transform( VipsImage *in, VipsImage **out, const char *output_profile, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_icc_import( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_icc_export( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_icc_ac2rc( VipsImage *in, VipsImage **out, const char *profile_filename ); @@ -226,13 +226,13 @@ gboolean vips_icc_is_compatible_profile( VipsImage *image, VIPS_API int vips_dE76( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_dE00( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_dECMC( VipsImage *left, VipsImage *right, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API void vips_col_Lab2XYZ( float L, float a, float b, diff --git a/libvips/include/vips/connection.h b/libvips/include/vips/connection.h index 47da0ec9..0fed4f12 100644 --- a/libvips/include/vips/connection.h +++ b/libvips/include/vips/connection.h @@ -515,7 +515,7 @@ VIPS_API int vips_target_writes( VipsTarget *target, const char *str ); VIPS_API int vips_target_writef( VipsTarget *target, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API int vips_target_write_amp( VipsTarget *target, const char *str ); diff --git a/libvips/include/vips/conversion.h b/libvips/include/vips/conversion.h index b93e2055..b3dd66aa 100644 --- a/libvips/include/vips/conversion.h +++ b/libvips/include/vips/conversion.h @@ -136,219 +136,219 @@ typedef enum { VIPS_API int vips_copy( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tilecache( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_linecache( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sequential( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cache( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_copy_file( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_embed( VipsImage *in, VipsImage **out, int x, int y, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gravity( VipsImage *in, VipsImage **out, VipsCompassDirection direction, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_flip( VipsImage *in, VipsImage **out, VipsDirection direction, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_insert( VipsImage *main, VipsImage *sub, VipsImage **out, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_join( VipsImage *in1, VipsImage *in2, VipsImage **out, VipsDirection direction, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_arrayjoin( VipsImage **in, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_extract_area( VipsImage *in, VipsImage **out, int left, int top, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_crop( VipsImage *in, VipsImage **out, int left, int top, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_smartcrop( VipsImage *in, VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_extract_band( VipsImage *in, VipsImage **out, int band, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_replicate( VipsImage *in, VipsImage **out, int across, int down, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_grid( VipsImage *in, VipsImage **out, int tile_height, int across, int down, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_transpose3d( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_wrap( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rot( VipsImage *in, VipsImage **out, VipsAngle angle, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rot90( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rot180( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rot270( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rot45( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API void vips_autorot_remove_angle( VipsImage *image ); VIPS_API int vips_autorot( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_zoom( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_subsample( VipsImage *in, VipsImage **out, int xfac, int yfac, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast( VipsImage *in, VipsImage **out, VipsBandFormat format, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_uchar( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_char( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_ushort( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_short( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_uint( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_int( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_float( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_double( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_complex( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_cast_dpcomplex( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_scale( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_msb( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_byteswap( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandjoin( VipsImage **in, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandjoin2( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandjoin_const( VipsImage *in, VipsImage **out, double *c, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandjoin_const1( VipsImage *in, VipsImage **out, double c, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandrank( VipsImage **in, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandfold( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandunfold( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandbool( VipsImage *in, VipsImage **out, VipsOperationBoolean boolean, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandand( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandor( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandeor( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_bandmean( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_recomb( VipsImage *in, VipsImage **out, VipsImage *m, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_ifthenelse( VipsImage *cond, VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_switch( VipsImage **tests, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_flatten( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_addalpha( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_premultiply( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_unpremultiply( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_composite( VipsImage **in, VipsImage **out, int n, int *mode, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_composite2( VipsImage *base, VipsImage *overlay, VipsImage **out, VipsBlendMode mode, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_falsecolour( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gamma( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/convolution.h b/libvips/include/vips/convolution.h index 1c33e7b5..c4fafe04 100644 --- a/libvips/include/vips/convolution.h +++ b/libvips/include/vips/convolution.h @@ -47,46 +47,46 @@ typedef enum { VIPS_API int vips_conv( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_convf( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_convi( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_conva( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_convsep( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_convasep( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_compass( VipsImage *in, VipsImage **out, VipsImage *mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gaussblur( VipsImage *in, VipsImage **out, double sigma, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sharpen( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_spcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_fastcor( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sobel( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_canny( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/create.h b/libvips/include/vips/create.h index 2b603db2..73c0e891 100644 --- a/libvips/include/vips/create.h +++ b/libvips/include/vips/create.h @@ -40,111 +40,111 @@ extern "C" { VIPS_API int vips_black( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_xyz( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_grey( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gaussmat( VipsImage **out, double sigma, double min_ampl, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_logmat( VipsImage **out, double sigma, double min_ampl, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_text( VipsImage **out, const char *text, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gaussnoise( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_eye( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_sines( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_zone( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_identity( VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_buildlut( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_invertlut( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tonelut( VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_ideal( VipsImage **out, int width, int height, double frequency_cutoff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_ideal_ring( VipsImage **out, int width, int height, double frequency_cutoff, double ringwidth, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_ideal_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_butterworth( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_butterworth_ring( VipsImage **out, int width, int height, double order, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_butterworth_band( VipsImage **out, int width, int height, double order, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_gaussian( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_gaussian_ring( VipsImage **out, int width, int height, double frequency_cutoff, double amplitude_cutoff, double ringwidth, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_gaussian_band( VipsImage **out, int width, int height, double frequency_cutoff_x, double frequency_cutoff_y, double radius, double amplitude_cutoff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mask_fractal( VipsImage **out, int width, int height, double fractal_dimension, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_fractsurf( VipsImage **out, int width, int height, double fractal_dimension, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_worley( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_perlin( VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/dbuf.h b/libvips/include/vips/dbuf.h index f00b3753..ce0e1c59 100644 --- a/libvips/include/vips/dbuf.h +++ b/libvips/include/vips/dbuf.h @@ -78,7 +78,7 @@ gboolean vips_dbuf_write( VipsDbuf *dbuf, const unsigned char *data, size_t size ); VIPS_API gboolean vips_dbuf_writef( VipsDbuf *dbuf, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API gboolean vips_dbuf_write_amp( VipsDbuf *dbuf, const char *str ); VIPS_API diff --git a/libvips/include/vips/dispatch.h b/libvips/include/vips/dispatch.h index 9c75db2a..ccbe533c 100644 --- a/libvips/include/vips/dispatch.h +++ b/libvips/include/vips/dispatch.h @@ -270,7 +270,7 @@ VIPS_DEPRECATED im_package *im_load_plugin( const char *name ); VIPS_DEPRECATED int im_load_plugins( const char *fmt, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); /* Close all plug-ins. */ diff --git a/libvips/include/vips/draw.h b/libvips/include/vips/draw.h index 889543b3..a9656df3 100644 --- a/libvips/include/vips/draw.h +++ b/libvips/include/vips/draw.h @@ -51,60 +51,60 @@ typedef enum { VIPS_API int vips_draw_rect( VipsImage *image, double *ink, int n, int left, int top, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_rect1( VipsImage *image, double ink, int left, int top, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_point( VipsImage *image, double *ink, int n, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_point1( VipsImage *image, double ink, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_image( VipsImage *image, VipsImage *sub, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_mask( VipsImage *image, double *ink, int n, VipsImage *mask, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_mask1( VipsImage *image, double ink, VipsImage *mask, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_line( VipsImage *image, double *ink, int n, int x1, int y1, int x2, int y2, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_line1( VipsImage *image, double ink, int x1, int y1, int x2, int y2, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_circle( VipsImage *image, double *ink, int n, int cx, int cy, int radius, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_circle1( VipsImage *image, double ink, int cx, int cy, int radius, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_flood( VipsImage *image, double *ink, int n, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_flood1( VipsImage *image, double ink, int x, int y, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_draw_smudge( VipsImage *image, int left, int top, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/error.h b/libvips/include/vips/error.h index 8cdbcabd..0262c409 100644 --- a/libvips/include/vips/error.h +++ b/libvips/include/vips/error.h @@ -49,12 +49,12 @@ void vips_error_thaw( void ); VIPS_API void vips_error( const char *domain, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API void vips_verror( const char *domain, const char *fmt, va_list ap ); VIPS_API void vips_error_system( int err, const char *domain, const char *fmt, ... ) - __attribute__((format(printf, 3, 4))); + G_GNUC_PRINTF( 3, 4 ); VIPS_API void vips_verror_system( int err, const char *domain, const char *fmt, va_list ap ); @@ -65,7 +65,7 @@ void vips_g_error( GError **error ); VIPS_API void vips_error_exit( const char *fmt, ... ) - __attribute__((noreturn, format(printf, 1, 2))); + G_GNUC_NORETURN G_GNUC_PRINTF( 1, 2 ); VIPS_API int vips_check_uncoded( const char *domain, VipsImage *im ); diff --git a/libvips/include/vips/foreign.h b/libvips/include/vips/foreign.h index 5c16076d..75dd06ae 100644 --- a/libvips/include/vips/foreign.h +++ b/libvips/include/vips/foreign.h @@ -401,23 +401,23 @@ const char *vips_foreign_find_save_target( const char *suffix ); VIPS_API int vips_vipsload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_vipsload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_vipssave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_vipssave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_openslideload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_openslideload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignSubsample: @@ -453,26 +453,26 @@ typedef enum { VIPS_API int vips_jpegload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jpegsave_mime( VipsImage *in, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignWebpPreset: @@ -497,26 +497,26 @@ typedef enum { VIPS_API int vips_webpload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_webpsave_mime( VipsImage *in, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignTiffCompression: @@ -584,90 +584,90 @@ typedef enum { VIPS_API int vips_tiffload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tiffload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tiffload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tiffsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tiffsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_tiffsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_openexrload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_fitsload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_fitssave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_analyzeload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rawload( const char *filename, VipsImage **out, int width, int height, int bands, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rawsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rawsave_fd( VipsImage *in, int fd, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_csvload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_csvload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_csvsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_csvsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixprint( VipsImage *in, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_magickload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_magickload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_magicksave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_magicksave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignPngFilter: @@ -692,22 +692,22 @@ typedef enum /*< flags >*/ { VIPS_API int vips_pngload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pngload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pngload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pngsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pngsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pngsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignPpmFormat: @@ -742,149 +742,149 @@ typedef enum { VIPS_API int vips_ppmload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_ppmload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_ppmsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_ppmsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_radsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pdfload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pdfload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_pdfload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_svgload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_svgload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_svgload_string( const char *str, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_svgload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_gifsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_heifsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_niftiload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_niftiload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_niftisave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2kload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2kload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2kload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2ksave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2ksave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jp2ksave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlload_source( VipsSource *source, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlload_buffer( void *buf, size_t len, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlload( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlsave( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_jxlsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignDzLayout: @@ -937,13 +937,13 @@ typedef enum { VIPS_API int vips_dzsave( VipsImage *in, const char *name, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_dzsave_buffer( VipsImage *in, void **buf, size_t *len, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_dzsave_target( VipsImage *in, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /** * VipsForeignHeifCompression: diff --git a/libvips/include/vips/freqfilt.h b/libvips/include/vips/freqfilt.h index 1f2bc192..a4c30499 100644 --- a/libvips/include/vips/freqfilt.h +++ b/libvips/include/vips/freqfilt.h @@ -40,22 +40,22 @@ extern "C" { VIPS_API int vips_fwfft( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_invfft( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_freqmult( VipsImage *in, VipsImage *mask, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_spectrum( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_phasecor( VipsImage *in1, VipsImage *in2, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/generate.h b/libvips/include/vips/generate.h index cba12ea5..80530953 100644 --- a/libvips/include/vips/generate.h +++ b/libvips/include/vips/generate.h @@ -71,7 +71,7 @@ VIPS_API int vips_stop_many( void *seq, void *a, void *b ); VIPS_API VipsImage **vips_allocate_input_array( VipsImage *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_image_generate( VipsImage *image, @@ -83,7 +83,7 @@ int vips_image_pipeline_array( VipsImage *image, VipsDemandStyle hint, VipsImage **in ); VIPS_API int vips_image_pipelinev( VipsImage *image, VipsDemandStyle hint, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/header.h b/libvips/include/vips/header.h index 1251fb46..502bf329 100644 --- a/libvips/include/vips/header.h +++ b/libvips/include/vips/header.h @@ -289,7 +289,7 @@ void vips_image_set_array_double( VipsImage *image, const char *name, VIPS_API int vips_image_history_printf( VipsImage *image, const char *format, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API int vips_image_history_args( VipsImage *image, const char *name, int argc, char *argv[] ); diff --git a/libvips/include/vips/histogram.h b/libvips/include/vips/histogram.h index db6a9ff2..324377a8 100644 --- a/libvips/include/vips/histogram.h +++ b/libvips/include/vips/histogram.h @@ -40,43 +40,43 @@ extern "C" { VIPS_API int vips_maplut( VipsImage *in, VipsImage **out, VipsImage *lut, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_percent( VipsImage *in, double percent, int *threshold, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_stdif( VipsImage *in, VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_cum( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_norm( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_equal( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_plot( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_match( VipsImage *in, VipsImage *ref, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_local( VipsImage *in, VipsImage **out, int width, int height, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_ismonotonic( VipsImage *in, gboolean *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_hist_entropy( VipsImage *in, double *out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_case( VipsImage *index, VipsImage **cases, VipsImage **out, int n, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/image.h b/libvips/include/vips/image.h index 458e63ab..b4d79353 100644 --- a/libvips/include/vips/image.h +++ b/libvips/include/vips/image.h @@ -459,7 +459,7 @@ VIPS_API VipsImage *vips_image_memory( void ); VIPS_API VipsImage *vips_image_new_from_file( const char *name, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API VipsImage *vips_image_new_from_file_RW( const char *filename ); VIPS_API @@ -474,10 +474,10 @@ VipsImage *vips_image_new_from_memory_copy( const void *data, size_t size, VIPS_API VipsImage *vips_image_new_from_buffer( const void *buf, size_t len, const char *option_string, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API VipsImage *vips_image_new_from_source( VipsSource *source, - const char *option_string, ... ) __attribute__((sentinel)); + const char *option_string, ... ) G_GNUC_NULL_TERMINATED; VIPS_API VipsImage *vips_image_new_matrix( int width, int height ); VIPS_API @@ -506,15 +506,15 @@ VIPS_API int vips_image_write( VipsImage *image, VipsImage *out ); VIPS_API int vips_image_write_to_file( VipsImage *image, const char *name, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_image_write_to_buffer( VipsImage *in, const char *suffix, void **buf, size_t *size, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_image_write_to_target( VipsImage *in, const char *suffix, VipsTarget *target, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API void *vips_image_write_to_memory( VipsImage *in, size_t *size ); @@ -564,7 +564,7 @@ gboolean vips_band_format_iscomplex( VipsBandFormat format ); VIPS_API int vips_system( const char *cmd_format, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; /* Defined in type.c but declared here, since they use VipsImage. */ diff --git a/libvips/include/vips/internal.h b/libvips/include/vips/internal.h index 2a06f8f7..363ef829 100644 --- a/libvips/include/vips/internal.h +++ b/libvips/include/vips/internal.h @@ -349,9 +349,9 @@ int vips__foreign_convert_saveable( VipsImage *in, VipsImage **ready, VipsArrayDouble *background ); int vips_foreign_load( const char *filename, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; int vips_foreign_save( VipsImage *in, const char *filename, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; int vips__image_intize( VipsImage *in, VipsImage **out ); diff --git a/libvips/include/vips/morphology.h b/libvips/include/vips/morphology.h index 0115ea5d..e14220f0 100644 --- a/libvips/include/vips/morphology.h +++ b/libvips/include/vips/morphology.h @@ -47,24 +47,24 @@ typedef enum { VIPS_API int vips_morph( VipsImage *in, VipsImage **out, VipsImage *mask, VipsOperationMorphology morph, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rank( VipsImage *in, VipsImage **out, int width, int height, int index, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_median( VipsImage *in, VipsImage **out, int size, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_countlines( VipsImage *in, double *nolines, VipsDirection direction, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_labelregions( VipsImage *in, VipsImage **mask, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_fill_nearest( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/mosaicing.h b/libvips/include/vips/mosaicing.h index 26ec0927..a7cd1718 100644 --- a/libvips/include/vips/mosaicing.h +++ b/libvips/include/vips/mosaicing.h @@ -41,36 +41,36 @@ extern "C" { VIPS_API int vips_merge( VipsImage *ref, VipsImage *sec, VipsImage **out, VipsDirection direction, int dx, int dy, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mosaic( VipsImage *ref, VipsImage *sec, VipsImage **out, VipsDirection direction, int xref, int yref, int xsec, int ysec, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mosaic1( VipsImage *ref, VipsImage *sec, VipsImage **out, VipsDirection direction, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_match( VipsImage *ref, VipsImage *sec, VipsImage **out, int xr1, int yr1, int xs1, int ys1, int xr2, int yr2, int xs2, int ys2, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_globalbalance( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_remosaic( VipsImage *in, VipsImage **out, const char *old_str, const char *new_str, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_matrixinvert( VipsImage *m, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus diff --git a/libvips/include/vips/object.h b/libvips/include/vips/object.h index bd1d106e..4cb6717e 100644 --- a/libvips/include/vips/object.h +++ b/libvips/include/vips/object.h @@ -349,7 +349,7 @@ int vips_object_get_argument_priority( VipsObject *object, const char *name ); (VipsArgumentClass *) p->data; \ VipsArgument *argument = (VipsArgument *) argument_class; \ GParamSpec *PSPEC = argument->pspec; \ - VipsArgumentInstance *ARG_INSTANCE __attribute__ ((unused)) = \ + VipsArgumentInstance *ARG_INSTANCE G_GNUC_UNUSED = \ vips__argument_get_instance( argument_class, \ VIPS_OBJECT( OBJECT ) ); \ @@ -401,7 +401,7 @@ int vips_object_get_argument_priority( VipsObject *object, const char *name ); g_value_unset( &value ); \ } \ else if( (ARG_CLASS->flags & VIPS_ARGUMENT_OUTPUT) ) { \ - void **arg __attribute__ ((unused)); \ + void **arg G_GNUC_UNUSED; \ \ /* Output args are a pointer to where to send the \ * result. \ @@ -640,7 +640,7 @@ VIPS_API int vips_object_set_valist( VipsObject *object, va_list ap ); VIPS_API int vips_object_set( VipsObject *object, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_object_set_from_string( VipsObject *object, const char *string ); diff --git a/libvips/include/vips/operation.h b/libvips/include/vips/operation.h index 11f27a77..5f9a0940 100644 --- a/libvips/include/vips/operation.h +++ b/libvips/include/vips/operation.h @@ -121,7 +121,7 @@ int vips_call_required_optional( VipsOperation **operation, va_list required, va_list optional ); VIPS_API int vips_call( const char *operation_name, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_call_split( const char *operation_name, va_list optional, ... ); VIPS_API diff --git a/libvips/include/vips/resample.h b/libvips/include/vips/resample.h index 34da582a..43bcab0f 100644 --- a/libvips/include/vips/resample.h +++ b/libvips/include/vips/resample.h @@ -59,62 +59,62 @@ typedef enum { VIPS_API int vips_shrink( VipsImage *in, VipsImage **out, double hshrink, double vshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_shrinkh( VipsImage *in, VipsImage **out, int hshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_shrinkv( VipsImage *in, VipsImage **out, int vshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_reduce( VipsImage *in, VipsImage **out, double hshrink, double vshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_reduceh( VipsImage *in, VipsImage **out, double hshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_reducev( VipsImage *in, VipsImage **out, double vshrink, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_thumbnail( const char *filename, VipsImage **out, int width, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_thumbnail_buffer( void *buf, size_t len, VipsImage **out, int width, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_thumbnail_image( VipsImage *in, VipsImage **out, int width, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_thumbnail_source( VipsSource *source, VipsImage **out, int width, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_similarity( VipsImage *in, VipsImage **out, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_rotate( VipsImage *in, VipsImage **out, double angle, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_affine( VipsImage *in, VipsImage **out, double a, double b, double c, double d, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_resize( VipsImage *in, VipsImage **out, double scale, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_mapim( VipsImage *in, VipsImage **out, VipsImage *index, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; VIPS_API int vips_quadratic( VipsImage *in, VipsImage **out, VipsImage *coeff, ... ) - __attribute__((sentinel)); + G_GNUC_NULL_TERMINATED; #ifdef __cplusplus } diff --git a/libvips/include/vips/type.h b/libvips/include/vips/type.h index 6a8481df..9437d31b 100644 --- a/libvips/include/vips/type.h +++ b/libvips/include/vips/type.h @@ -256,7 +256,7 @@ VIPS_API void vips_value_set_save_string( GValue *value, const char *str ); VIPS_API void vips_value_set_save_stringf( GValue *value, const char *fmt, ... ) - __attribute__((format(printf, 2, 3))); + G_GNUC_PRINTF( 2, 3 ); VIPS_API const char *vips_value_get_ref_string( const GValue *value, size_t *length ); diff --git a/libvips/include/vips/util.h b/libvips/include/vips/util.h index b8f09462..35d9531f 100644 --- a/libvips/include/vips/util.h +++ b/libvips/include/vips/util.h @@ -266,7 +266,7 @@ VIPS_API int vips_vsnprintf( char *str, size_t size, const char *format, va_list ap ); VIPS_API int vips_snprintf( char *str, size_t size, const char *format, ... ) - __attribute__((format(printf, 3, 4))); + G_GNUC_PRINTF( 3, 4 ); VIPS_API int vips_filename_suffix_match( const char *path, const char *suffixes[] ); @@ -317,16 +317,16 @@ gint64 vips__seek( int fd, gint64 pos, int whence ); int vips__ftruncate( int fd, gint64 pos ); VIPS_API int vips_existsf( const char *name, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_API int vips_isdirf( const char *name, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_API int vips_mkdirf( const char *name, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_API int vips_rmdirf( const char *name, ... ) - __attribute__((format(printf, 1, 2))); + G_GNUC_PRINTF( 1, 2 ); VIPS_API int vips_rename( const char *old_name, const char *new_name ); diff --git a/libvips/include/vips/vips.h b/libvips/include/vips/vips.h index d9e575de..24b7d391 100644 --- a/libvips/include/vips/vips.h +++ b/libvips/include/vips/vips.h @@ -93,22 +93,6 @@ extern "C" { #endif /*__cplusplus*/ -/* If we're being parsed by SWIG, remove gcc attributes. - */ -#ifdef SWIG -# ifndef __attribute__ -# define __attribute__(x) /*NOTHING*/ -# endif -#endif /*SWIG*/ - -/* Or if this isn't gcc. - */ -#ifndef __GNUC__ -# ifndef __attribute__ -# define __attribute__(x) /*NOTHING*/ -# endif -#endif /*__GNUC__*/ - #include #include diff --git a/libvips/include/vips/vips7compat.h b/libvips/include/vips/vips7compat.h index e38725d4..1d4ea2a1 100644 --- a/libvips/include/vips/vips7compat.h +++ b/libvips/include/vips/vips7compat.h @@ -1637,7 +1637,7 @@ VipsWindow *vips_window_ref( VipsImage *im, int top, int height ); VIPS_DEPRECATED FILE *vips_popenf( const char *fmt, const char *mode, ... ) - __attribute__((format(printf, 1, 3))); + G_GNUC_PRINTF( 1, 3 ); double *vips__ink_to_vector( const char *domain, VipsImage *im, VipsPel *ink, int *n );