From: Tony Cook Date: Fri, 26 Oct 2007 08:41:22 +0000 (+0000) Subject: - prevent a cast to integer warning on x64 builds in datatypes.c X-Git-Tag: Imager-0.61~18 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/8a2cd317acbc6fbc8fa35d8df72b01f7ce73bca2 - prevent a cast to integer warning on x64 builds in datatypes.c also fixed some other type warnings --- diff --git a/Changes b/Changes index a75c7418..59f7530d 100644 --- a/Changes +++ b/Changes @@ -7,10 +7,16 @@ Imager 0.61 - unreleased when scaling an animated gif http://rt.cpan.org/Ticket/Display.html?id=27591 +Bug fixes: + - correct handling of sz in matrix_transform() - this should allow perspective type transformations to work now. http://rt.cpan.org/Ticket/Display.html?id=29936 + - prevent a cast to integer warning on x64 builds in datatypes.c + also fixed some other type warnings + https://rt.cpan.org/Ticket/Display.html?id=30204 + Imager 0.60 - 30 August 2007 =========== diff --git a/TODO b/TODO index 43ad7ad6..75266732 100644 --- a/TODO +++ b/TODO @@ -57,6 +57,8 @@ CMYK alpha TIFF problems with old libtiff (#29353) (done) matrix_transform() should use fabs() instead of abs() range checking sz (#29936) (done) +warning compiling datatypes.c on x64 (#30204) (done) + For 0.60 (hopefully): RGB file support (#8666) (done) diff --git a/datatypes.c b/datatypes.c index dfbf6a67..b6d80d76 100644 --- a/datatypes.c +++ b/datatypes.c @@ -248,8 +248,12 @@ void octt_dump(struct octt *ct) { int i; /* printf("node [0x%08X] -> (%d)\n",ct,ct->cnt); */ - for(i=0;i<8;i++) if (ct->t[i] != NULL) printf("[ %d ] -> 0x%08X\n",i,(unsigned int)ct->t[i]); - for(i=0;i<8;i++) if (ct->t[i] != NULL) octt_dump(ct->t[i]); + for(i=0;i<8;i++) + if (ct->t[i] != NULL) + printf("[ %d ] -> %p\n", i, (void *)ct->t[i]); + for(i=0;i<8;i++) + if (ct->t[i] != NULL) + octt_dump(ct->t[i]); } /* note that all calls of octt_count are operating on the same overflow diff --git a/dynfilt/dt2.c b/dynfilt/dt2.c index d25de40d..8278d25b 100644 --- a/dynfilt/dt2.c +++ b/dynfilt/dt2.c @@ -23,7 +23,8 @@ html_art(void *INP) { printf("parameters: (im 0x%p,fname %s)\n",im,fname); - printf("image info:\n size (%d,%d)\n channels (%d)\n channel mask (%d)\n bytes (%d)\n",im->xsize,im->ysize,im->channels,im->ch_mask,im->bytes); + printf("image info:\n size (%d,%d)\n channels (%d)\n", + im->xsize,im->ysize,im->channels); fp=fopen(fname,"ab+"); fprintf(fp,""); diff --git a/dynfilt/dyntest.c b/dynfilt/dyntest.c index e9916446..10e449d4 100644 --- a/dynfilt/dyntest.c +++ b/dynfilt/dyntest.c @@ -44,7 +44,8 @@ void lin_stretch(void *INP) { i_img_info(im,info); for(i=0;i<4;i++) { printf("%d: %d\n",i,info[i]); } - printf("image info:\n size (%d,%d)\n channels (%d)\n channel mask (%d)\n bytes (%d)\n",im->xsize,im->ysize,im->channels,im->ch_mask,im->bytes); + printf("image info:\n size (%d,%d)\n channels (%d)\n", + im->xsize, im->ysize, im->channels); for(y=0;yysize;y++) for(x=0;xxsize;x++) { i_gpix(im,x,y,&rcolor); diff --git a/dynfilt/flines.c b/dynfilt/flines.c index 79ac9a9d..f018477c 100644 --- a/dynfilt/flines.c +++ b/dynfilt/flines.c @@ -30,8 +30,9 @@ flines(void *INP) { return; } - fprintf(stderr, "flines: parameters: (im 0x%x)\n",im); - fprintf(stderr, "flines: image info:\n size (%d,%d)\n channels (%d)\n channel mask (%d)\n bytes (%d)\n",im->xsize,im->ysize,im->channels,im->ch_mask,im->bytes); + fprintf(stderr, "flines: parameters: (im %p)\n",im); + fprintf(stderr, "flines: image info:\n size (%d,%d)\n channels (%d)\n", + im->xsize,im->ysize,im->channels); for(y = 0; y < im->ysize; y ++) { for(x = 0; x < im->xsize; x ++ ) { diff --git a/dynfilt/mandelbrot.c b/dynfilt/mandelbrot.c index fdab28ec..ca3500e8 100644 --- a/dynfilt/mandelbrot.c +++ b/dynfilt/mandelbrot.c @@ -40,7 +40,6 @@ mandel(float x, float y) { void mandlebrot(void *INP) { i_img *im; - i_color vl; int i,bytes,x,y; int idx; @@ -66,7 +65,8 @@ void mandlebrot(void *INP) { fprintf(stderr,"mandlebrot: parameters: (im %p)\n",im); bytes=im->bytes; - fprintf(stderr, "mandlebrot: image info:\n size (%d,%d)\n channels (%d)\n channel mask (%d)\n bytes (%d)\n",im->xsize,im->ysize,im->channels,im->ch_mask,im->bytes); + fprintf(stderr, "mandlebrot: image info:\n size (%d,%d)\n channels (%d)\n", + im->xsize,im->ysize,im->channels); div = 2.5; xs = 0.8*div;