From 49d51e4eb68c24a8f014471ece85d0bf3a56a2ee Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 25 Mar 2017 16:10:30 +0000 Subject: [PATCH] fix a compiler wanring thank you clang --- tools/vipsthumbnail.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/vipsthumbnail.c b/tools/vipsthumbnail.c index a369c514..2a4fe18f 100644 --- a/tools/vipsthumbnail.c +++ b/tools/vipsthumbnail.c @@ -246,10 +246,14 @@ thumbnail_process( VipsObject *process, const char *filename ) interesting = VIPS_INTERESTING_NONE; if( crop_image ) interesting = VIPS_INTERESTING_CENTRE; - if( smartcrop_image && - (interesting = vips_enum_from_nick( "vipsthumbnail", + if( smartcrop_image ) { + int n; + + if( (n = vips_enum_from_nick( "vipsthumbnail", VIPS_TYPE_INTERESTING, smartcrop_image )) < 0 ) - return( -1 ); + return( -1 ); + interesting = n; + } if( vips_thumbnail( filename, &image, thumbnail_width, "height", thumbnail_height,