fix a used before set warning
This commit is contained in:
parent
b210d34192
commit
228784c52e
6
TODO
6
TODO
@ -1,3 +1,9 @@
|
||||
- have this warning:
|
||||
|
||||
im_histspec.c: In function 'im_histspec':
|
||||
im_histspec.c:101:6: warning: 'px' may be used uninitialized in this function
|
||||
[-Wuninitialized]
|
||||
im_histspec.c:79:6: note: 'px' was declared here:n ../his
|
||||
|
||||
- vips operation print could show operation flags as well, cf. "vips
|
||||
im_subtract"
|
||||
|
@ -68,18 +68,18 @@
|
||||
static int
|
||||
match( IMAGE *in, IMAGE *ref, IMAGE *out )
|
||||
{
|
||||
const int inpx = in->Xsize * in->Ysize;
|
||||
const int refpx = ref->Xsize * ref->Ysize;
|
||||
const guint64 inpx = (guint64) in->Xsize * in->Ysize;
|
||||
const guint64 refpx = (guint64) ref->Xsize * ref->Ysize;
|
||||
const int bands = in->Bands;
|
||||
|
||||
unsigned int *inbuf; /* in and ref, padded to same size */
|
||||
unsigned int *refbuf;
|
||||
unsigned int *outbuf; /* Always output as uint */
|
||||
|
||||
int px; /* Number of pixels */
|
||||
int max; /* px * bands */
|
||||
guint64 px; /* Number of pixels */
|
||||
guint64 max; /* px * bands */
|
||||
|
||||
int i, j;
|
||||
guint64 i, j;
|
||||
|
||||
if( im_iocheck( in, out ) ||
|
||||
im_iocheck( ref, out ) ||
|
||||
@ -98,6 +98,8 @@ match( IMAGE *in, IMAGE *ref, IMAGE *out )
|
||||
px = 256;
|
||||
else if( inpx <= 65536 && refpx <= 65536 )
|
||||
px = 65536;
|
||||
else
|
||||
px = IM_MAX( inpx, refpx );
|
||||
max = px * bands;
|
||||
|
||||
/* Unpack to equal-sized buffers.
|
||||
|
@ -45,7 +45,6 @@
|
||||
#include <unistd.h>
|
||||
#endif /*HAVE_UNISTD_H*/
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
Loading…
Reference in New Issue
Block a user