diff --git a/TODO b/TODO index 349c67f2..46277681 100644 --- a/TODO +++ b/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" diff --git a/libvips/histograms_lut/im_histspec.c b/libvips/histograms_lut/im_histspec.c index 5ba9cfb9..e72a0c8f 100644 --- a/libvips/histograms_lut/im_histspec.c +++ b/libvips/histograms_lut/im_histspec.c @@ -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. diff --git a/libvips/video/im_video_v4l1.c b/libvips/video/im_video_v4l1.c index 5e5816f0..02ca09d9 100644 --- a/libvips/video/im_video_v4l1.c +++ b/libvips/video/im_video_v4l1.c @@ -45,7 +45,6 @@ #include #endif /*HAVE_UNISTD_H*/ #include -#include #include #include