]> git.imager.perl.org - imager.git/commitdiff
- prevent a cast to integer warning on x64 builds in datatypes.c
authorTony Cook <tony@develop=help.com>
Fri, 26 Oct 2007 08:41:22 +0000 (08:41 +0000)
committerTony Cook <tony@develop=help.com>
Fri, 26 Oct 2007 08:41:22 +0000 (08:41 +0000)
   also fixed some other type warnings

Changes
TODO
datatypes.c
dynfilt/dt2.c
dynfilt/dyntest.c
dynfilt/flines.c
dynfilt/mandelbrot.c

diff --git a/Changes b/Changes
index a75c7418695c3922708bbcf016658a66fefb4c54..59f7530d75c27edb5b9cd99c1a2f62e01217b01f 100644 (file)
--- 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 43ad7ad6126f069878e696b6c10ec27b6d5d0d23..752667327bf1e976f9b1eebc3cab0863a6444c42 100644 (file)
--- 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)
index dfbf6a67cbe3c2da376d2f5d08c6f7a9b2988700..b6d80d76241f93f834e121061d4d319e0319f14a 100644 (file)
@@ -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 
index d25de40dbbc1d7e73a1298268055ae2d514567dc..8278d25bfe6cb7ad376b2768d36f71350b449d02 100644 (file)
@@ -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,"<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\">");
index e9916446fddce08f61c283a14b5359b5ee291d83..10e449d45f8728912e8bee85896ab3ecb8423f34 100644 (file)
@@ -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;y<im->ysize;y++) for(x=0;x<im->xsize;x++) {
     i_gpix(im,x,y,&rcolor);
index 79ac9a9da4ea9b71753b87b93ee2a3112e194a04..f018477cce4e563b3b16b39bdd87865fcdbff18c 100644 (file)
@@ -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 ++ ) {
index fdab28ecebd591054fabd1d65eeccfe4f44576e0..ca3500e8353ee7fec22e44fe706f90388f1af8b3 100644 (file)
@@ -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;