fix some more compiler warnings

and a bit of formatting
This commit is contained in:
John Cupitt 2016-01-26 15:10:46 +00:00
parent 2698688c94
commit db20d70495
5 changed files with 26 additions and 23 deletions

View File

@ -4,15 +4,14 @@
- ifthenelse needs less C stack during eval
- better rounding in bilinear interpolator
- fix to "make check" in non-C locales [felixbuenemann]
- use builtin isnan isinf when possible [Lovell Fuller]
- use compiler builtins isnan, isinf, fabs, fmin, fmax, ceil, floor when
possible [Lovell Fuller]
- tune vips_shrinkh(), 30% faster [Lovell Fuller]
- remove SEQ hint from vips_subsample(), fixes cli performance [erdmann]
- fix double free on attach ICC profile from file in tiff write [erdmann]
- add VIPS_FLOOR()/VIPS_CEIL(), much faster [Lovell Fuller]
- use g_assert_not_reached();
- use g_assert_not_reached()
- better vips-from-C docs
- add VIPS_FMIN() / VIPS_FMAX() / VIPS_FABS() / VIPS_FCLIP() ... use builtins
when available
- remove Duff from im_conv() / im_conv_f() for a 25% speedup [Lovell Fuller]
1/1/16 started 8.2.1
- add a compat stub [Benjamin Gilbert]

View File

@ -99,6 +99,11 @@ vips_join_build( VipsObject *object )
if( VIPS_OBJECT_CLASS( vips_join_parent_class )->build( object ) )
return( -1 );
/* Stop compiler warnings.
*/
x = 0;
y = 0;
switch( join->direction ) {
case VIPS_DIRECTION_HORIZONTAL:
x = join->in1->Xsize + join->shim;
@ -118,10 +123,6 @@ vips_join_build( VipsObject *object )
default:
g_assert_not_reached();
/* Stop compiler warnings.
*/
y = 0;
}
break;
@ -144,10 +145,6 @@ vips_join_build( VipsObject *object )
default:
g_assert_not_reached();
/* Stop compiler warnings.
*/
x = 0;
}
break;

View File

@ -67,6 +67,8 @@
* - argh typo in overflow estimation could cause errors
* 15/10/11 Nicolas
* - handle offset correctly in seperable convolutions
* 26/1/16 Lovell Fuller
* - remove Duff for a 25% speedup
*/
/*
@ -635,9 +637,10 @@ conv_start( IMAGE *out, void *a, void *b )
TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \
\
for( x = 0; x < sz; x++ ) { \
int sum; \
int i; \
int sum = 0; \
\
sum = 0; \
for ( i = 0; i < nnz; i++ ) \
sum += t[i] * p[i][x]; \
\
@ -656,9 +659,10 @@ conv_start( IMAGE *out, void *a, void *b )
TYPE * restrict q = (TYPE *) IM_REGION_ADDR( or, le, y ); \
\
for( x = 0; x < sz; x++ ) { \
double sum; \
int i; \
double sum = 0; \
\
sum = 0; \
for ( i = 0; i < nnz; i++ ) \
sum += t[i] * p[i][x]; \
\

View File

@ -43,6 +43,8 @@
* keeping two versions
* 15/10/11 Nicolas
* - handle offset correctly in seperable convolutions
* 26/1/16 Lovell Fuller
* - remove Duff for a 25% speedup
*/
/*
@ -209,9 +211,10 @@ conv_start( IMAGE *out, void *a, void *b )
OTYPE * restrict q = (OTYPE *) IM_REGION_ADDR( or, le, y ); \
\
for( x = 0; x < sz; x++ ) { \
double sum; \
int i; \
double sum = 0; \
\
sum = 0; \
for ( i = 0; i < nnz; i++ ) \
sum += t[i] * p[i][x]; \
\

View File

@ -112,6 +112,13 @@ vips_mapim_region_minmax( VipsRegion *region, VipsRect *r, VipsRect *bounds )
gboolean first;
int x, y;
/* Stop compiler warnings.
*/
min_x = 0;
max_x = 0;
min_y = 0;
max_y = 0;
first = TRUE;
for( y = 0; y < r->height; y++ ) {
VipsPel * restrict p =
@ -141,13 +148,6 @@ vips_mapim_region_minmax( VipsRegion *region, VipsRect *r, VipsRect *bounds )
default:
g_assert_not_reached();
/* Stop compiler warnings.
*/
min_x = 0;
max_x = 0;
min_y = 0;
max_y = 0;
}
}