fix some compiler warnings

various false positives from gcc -O3 flow analysis
This commit is contained in:
John Cupitt 2014-08-05 19:23:56 +01:00
parent 46673b60d7
commit 7888526361
5 changed files with 15 additions and 7 deletions

View File

@ -3,11 +3,12 @@
- limit n_thr on tiny images
- don't exit() on memleak detected, just warn
- add "autocrop" option to openslide load
- argh fix affine, again
- pngsave in interlaced mode make a copy of the whole image
- vipsthumbnail shrinks to 1/2 window_size
- argh fix affine, again, there were sometimes black bars with nohalo and the
vips8 interface
- pngsave in interlaced mode makes a copy of the image, so it's always seq
- vipsthumbnail shrinks to 1/2 window_size: faster and better quality
- vipsthumbnail defaults to bicubic + nosharpen
- better rounding behaviour for fixed-point bicubic
- better rounding behaviour for fixed-point bicubic reduces noise
4/7/14 started 7.40.4
- fix vips_rawsave_fd(), thanks aferrero2707

View File

@ -262,6 +262,7 @@ vips_spcor_correlation( VipsCorrelation *correlation,
default:
g_assert( 0 );
return;
}
c2 = sqrt( sum2 );

View File

@ -827,6 +827,11 @@ scanline_write( COLR *scanline, int width, FILE *fp )
for( i = 0; i < 4; i++ ) {
for( j = 0; j < width; ) {
/* Not needed, but keeps gcc used-before-set wsrning
* quiet.
*/
cnt = 1;
/* Set beg / cnt to the start and length of the next
* run longer than MINRUN.
*/

View File

@ -1053,7 +1053,8 @@ parse_header( ReadTiff *rtiff, VipsImage *out )
if( tfexists( rtiff->tiff, TIFFTAG_PLANARCONFIG ) ) {
int v;
tfget16( rtiff->tiff, TIFFTAG_PLANARCONFIG, &v );
if( !tfget16( rtiff->tiff, TIFFTAG_PLANARCONFIG, &v ) )
return( -1 );
if( v == PLANARCONFIG_SEPARATE )
rtiff->separate = TRUE;
}

View File

@ -1599,8 +1599,7 @@ vips_enum_from_nick( const char *domain, GType type, const char *nick )
#define BIGBUF (10000)
/* Scan @buf for the first "%ns" (eg. "%12s") and substitute the
* lowest-numbered one for @sub. @buf is @len bytes
* in size.
* lowest-numbered one for @sub. @buf is @len bytes in size.
*
* If there are no %ns, use the first %s.
*/
@ -1620,6 +1619,7 @@ vips__substitute( const char *domain, char *buf, size_t len, char *sub )
lowest_n = -1;
sub_start = NULL;
sub_end = NULL;
for( p = buf; (p = strchr( p, '%' )); p++ )
if( isdigit( p[1] ) ) {
char *q;