diff --git a/src/modules/Image/encodings/dsi.c b/src/modules/Image/encodings/dsi.c
index caccb1ef7850eab5b17cf931ea5154020daca06e..243642dd286ba1f9a068c1a2d9d6d5d770104314 100644
--- a/src/modules/Image/encodings/dsi.c
+++ b/src/modules/Image/encodings/dsi.c
@@ -1,7 +1,7 @@
 /* Dream SNES Image file */
 
 #include "global.h"
-RCSID("$Id: dsi.c,v 1.1 2000/10/08 22:39:32 per Exp $");
+RCSID("$Id: dsi.c,v 1.2 2000/10/19 13:40:02 grubba Exp $");
 
 #include "image_machine.h"
 
@@ -37,22 +37,24 @@ void f__decode( INT32 args )
 {
   int xs, ys, x, y;
   unsigned char *data, *dp;
-  unsigned int len;
+  size_t len;
   struct object *i, *a;
   struct image *ip, *ap;
   rgb_group black = {0,0,0};
   if( sp[-args].type != T_STRING )
     error("Illegal argument 1 to Image.DSI._decode\n");
   data = (unsigned char *)sp[-args].u.string->str;
-  len = (unsigned int )sp[-args].u.string->len;
+  len = (size_t)sp[-args].u.string->len;
 
   if( len < 10 ) error("Data too short\n");
 
   xs = data[0] | (data[1]<<8) | (data[2]<<16) | (data[3]<<24);
   ys = data[4] | (data[5]<<8) | (data[6]<<16) | (data[7]<<24);
 
-  if( (xs * ys * 2) != (int)(len-8) )
-    error("Not a DSI %d * %d + 8 != %d\n", xs,ys, len);
+  if( (xs * ys * 2) != (ptrdiff_t)(len-8) )
+    error("Not a DSI %d * %d + 8 != %ld\n",
+	  xs, ys,
+	  DO_NOT_WARN((long)len));
 
   push_int( xs );
   push_int( ys );
diff --git a/src/modules/Image/encodings/xcf.c b/src/modules/Image/encodings/xcf.c
index a4b835ad1955b3d26c7d1590ef6c2becf02b86d5..72c30c29e43b74d21a8db2d37aa07a15b3564529 100644
--- a/src/modules/Image/encodings/xcf.c
+++ b/src/modules/Image/encodings/xcf.c
@@ -1,5 +1,5 @@
 #include "global.h"
-RCSID("$Id: xcf.c,v 1.26 2000/10/19 13:28:10 grubba Exp $");
+RCSID("$Id: xcf.c,v 1.27 2000/10/19 13:37:52 grubba Exp $");
 
 #include "image_machine.h"
 
@@ -59,8 +59,8 @@ struct buffer
 struct substring
 {
   struct pike_string *s;
-  int offset;
-  int len;
+  ptrdiff_t offset;
+  ptrdiff_t len;
 };
 
 static struct program *substring_program;