diff --git a/src/gc.c b/src/gc.c
index 5234445b5437764005c7ea1987f22bc9b176f826..60bd6dc831e6d55491a7688df00e00bdebfcd91c 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -29,7 +29,7 @@ struct callback *gc_evaluator_callback=0;
 
 #include "block_alloc.h"
 
-RCSID("$Id: gc.c,v 1.111 2000/08/03 18:37:57 grubba Exp $");
+RCSID("$Id: gc.c,v 1.112 2000/08/10 08:33:00 grubba Exp $");
 
 /* Run garbage collect approximately every time
  * 20 percent of all arrays, objects and programs is
@@ -524,7 +524,7 @@ static void gdb_gc_stop_here(void *a, int weak)
   fprintf(stderr,"----------end------------\n");
 }
 
-void debug_gc_xmark_svalues(struct svalue *s, int num, char *fromwhere)
+void debug_gc_xmark_svalues(struct svalue *s, ptrdiff_t num, char *fromwhere)
 {
   found_in=(void *)fromwhere;
   found_in_type=-1;
@@ -533,7 +533,7 @@ void debug_gc_xmark_svalues(struct svalue *s, int num, char *fromwhere)
   found_in=0;
 }
 
-void debug_gc_check_svalues(struct svalue *s, int num, TYPE_T t, void *data)
+void debug_gc_check_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data)
 {
   found_in=data;
   found_in_type=t;
@@ -542,7 +542,7 @@ void debug_gc_check_svalues(struct svalue *s, int num, TYPE_T t, void *data)
   found_in=0;
 }
 
-void debug_gc_check_weak_svalues(struct svalue *s, int num, TYPE_T t, void *data)
+void debug_gc_check_weak_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data)
 {
   found_in=data;
   found_in_type=t;
diff --git a/src/gc.h b/src/gc.h
index c56bab45591ceb5e31d41f5b58ae9e2e0c66d02b..d44a7b14fdeb7fecc04e53f7fa211ea17dec016c 100644
--- a/src/gc.h
+++ b/src/gc.h
@@ -1,5 +1,5 @@
 /*
- * $Id: gc.h,v 1.59 2000/08/09 12:49:27 grubba Exp $
+ * $Id: gc.h,v 1.60 2000/08/10 08:33:45 grubba Exp $
  */
 #ifndef GC_H
 #define GC_H
@@ -115,9 +115,9 @@ void describe_location(void *real_memblock,
 		       int depth,
 		       int flags);
 void debug_gc_fatal(void *a, int flags, const char *fmt, ...);
-void debug_gc_xmark_svalues(struct svalue *s, int num, char *fromwhere);
-void debug_gc_check_svalues(struct svalue *s, int num, TYPE_T t, void *data);
-void debug_gc_check_weak_svalues(struct svalue *s, int num, TYPE_T t, void *data);
+void debug_gc_xmark_svalues(struct svalue *s, ptrdiff_t num, char *fromwhere);
+void debug_gc_check_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data);
+void debug_gc_check_weak_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data);
 void debug_gc_check_short_svalue(union anything *u, TYPE_T type, TYPE_T t, void *data);
 void debug_gc_check_weak_short_svalue(union anything *u, TYPE_T type, TYPE_T t, void *data);
 int debug_gc_check(void *x, TYPE_T t, void *data);
diff --git a/src/interpret.c b/src/interpret.c
index be7d1c55c64cc761b8cb85238c257f4870c9180d..a5821d0c0f348fd30b188c41769198bb04b4b222 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: interpret.c,v 1.160 2000/08/08 19:40:41 grubba Exp $");
+RCSID("$Id: interpret.c,v 1.161 2000/08/10 08:35:24 grubba Exp $");
 #include "interpret.h"
 #include "object.h"
 #include "program.h"
@@ -545,7 +545,8 @@ void dump_backlog(void)
       {
 	fprintf(stderr,"(%ld)", (long)backlog[e].arg);
       }
-      fprintf(stderr," %d, %d\n", backlog[e].stack, backlog[e].mark_stack);
+      fprintf(stderr," %ld, %ld\n",
+	      (long)backlog[e].stack, (long)backlog[e].mark_stack);
     }
   }while(e!=backlogp);
 }
diff --git a/src/interpret_functions.h b/src/interpret_functions.h
index 5f8d59a6f80255ad1da25cdf53a34d3efc556429..61fa3772a473eda71c75914050429b176c3eb8a9 100644
--- a/src/interpret_functions.h
+++ b/src/interpret_functions.h
@@ -1,5 +1,5 @@
 /*
- * $Id: interpret_functions.h,v 1.29 2000/08/08 19:37:13 grubba Exp $
+ * $Id: interpret_functions.h,v 1.30 2000/08/10 08:36:45 grubba Exp $
  *
  * Opcode definitions for the interpreter.
  */
@@ -1500,7 +1500,9 @@ BREAK;
       break;
 
     CASE(F_CALL_FUNCTION);
-      mega_apply(APPLY_STACK,Pike_sp - *--Pike_mark_sp,0,0);
+      mega_apply(APPLY_STACK,
+		 DO_NOT_WARN(Pike_sp - *--Pike_mark_sp),
+		 0,0);
       break;
 
     CASE(F_CALL_FUNCTION_AND_RETURN);
diff --git a/src/interpreter.h b/src/interpreter.h
index 0a1079c681175e4a14eb64054d987725655ed116..caeaa5378c62d110fc81a9c683d6edd85689b12d 100644
--- a/src/interpreter.h
+++ b/src/interpreter.h
@@ -122,10 +122,10 @@ static int eval_instruction(unsigned char *pc)
       while((f=STRCHR(file,'/'))) file=f+1;
       fprintf(stderr,"- %s:%4ld:(%lx): %-25s %4ld %4ld\n",
 	      file,(long)linep,
-	      (long)(pc-Pike_fp->context.prog->program-1),
+	      DO_NOT_WARN((long)(pc-Pike_fp->context.prog->program-1)),
 	      get_f_name(instr + F_OFFSET),
-	      (long)(Pike_sp-Pike_interpreter.evaluator_stack),
-	      (long)(Pike_mark_sp-Pike_interpreter.mark_stack));
+	      DO_NOT_WARN((long)(Pike_sp-Pike_interpreter.evaluator_stack)),
+	      DO_NOT_WARN((long)(Pike_mark_sp-Pike_interpreter.mark_stack)));
     }
 
     if(instr + F_OFFSET < F_MAX_OPCODE) 
diff --git a/src/modules/files/sendfile.c b/src/modules/files/sendfile.c
index 1510afac75a2b4a8cf1722151e29d91f875279fa..1c22fa1f29a40ac1841c2f6c977aa0ed729b5eb2 100644
--- a/src/modules/files/sendfile.c
+++ b/src/modules/files/sendfile.c
@@ -1,5 +1,5 @@
 /*
- * $Id: sendfile.c,v 1.40 2000/08/07 10:04:56 grubba Exp $
+ * $Id: sendfile.c,v 1.41 2000/08/10 08:19:38 grubba Exp $
  *
  * Sends headers + from_fd[off..off+len-1] + trailers to to_fd asyncronously.
  *
@@ -246,12 +246,12 @@ static void call_callback_and_free(struct callback *cb, void *this_, void *arg)
  */
 
 /* writev() without the IOV_MAX limit. */
-static int send_iov(int fd, struct iovec *iov, int iovcnt)
+static ptrdiff_t send_iov(int fd, struct iovec *iov, int iovcnt)
 {
-  int sent = 0;
+  ptrdiff_t sent = 0;
 
   while (iovcnt) {
-    int bytes;
+    ptrdiff_t bytes;
     int cnt = iovcnt;
 
 #ifdef IOV_MAX
diff --git a/src/modules/files/udp.c b/src/modules/files/udp.c
index 8e48c16645ef60acd27a3e8d737110525512d6e3..b9909e8cb77127853e9cfb29c71acd2935452100 100644
--- a/src/modules/files/udp.c
+++ b/src/modules/files/udp.c
@@ -1,5 +1,5 @@
 /*
- * $Id: udp.c,v 1.13 2000/08/07 10:05:52 grubba Exp $
+ * $Id: udp.c,v 1.14 2000/08/10 08:20:45 grubba Exp $
  */
 
 #define NO_PIKE_SHORTHAND
@@ -7,7 +7,7 @@
 
 #include "file_machine.h"
 
-RCSID("$Id: udp.c,v 1.13 2000/08/07 10:05:52 grubba Exp $");
+RCSID("$Id: udp.c,v 1.14 2000/08/10 08:20:45 grubba Exp $");
 #include "fdlib.h"
 #include "interpret.h"
 #include "svalue.h"
@@ -391,7 +391,8 @@ void udp_read(INT32 args)
 
 void udp_sendto(INT32 args)
 {
-  int flags = 0, res=0, i, fd, e;
+  int flags = 0, i, fd, e;
+  ptrdiff_t res = 0;
   struct sockaddr_in to;
   char *str;
   ptrdiff_t len;
@@ -468,7 +469,7 @@ void udp_sendto(INT32 args)
     }
   }
   pop_n_elems(args);
-  push_int( res );
+  push_int(DO_NOT_WARN(res));
 }
 
 
diff --git a/src/modules/sprintf/sprintf.c b/src/modules/sprintf/sprintf.c
index 3e253815e6101558743122a2a7811db6e2c29f89..c8c317078bb1bc8e27431de99041510a4a3e47c3 100644
--- a/src/modules/sprintf/sprintf.c
+++ b/src/modules/sprintf/sprintf.c
@@ -103,7 +103,7 @@
 */
 
 #include "global.h"
-RCSID("$Id: sprintf.c,v 1.69 2000/08/09 12:30:03 grubba Exp $");
+RCSID("$Id: sprintf.c,v 1.70 2000/08/10 08:29:40 grubba Exp $");
 #include "error.h"
 #include "array.h"
 #include "svalue.h"
@@ -373,7 +373,7 @@ INLINE static void fix_field(struct string_builder *r,
 			     ptrdiff_t pad_length,
 			     char pos_pad)
 {
-  int e,d;
+  ptrdiff_t e,d;
   if(!width || width==SPRINTF_UNDECIDED)
   {
     if(pos_pad && EXTRACT_PCHARP(b)!='-') string_builder_putchar(r,pos_pad);
@@ -588,7 +588,8 @@ INLINE static int do_one(struct format_stack *fs,
   }
   else if(f->flags & COLUMN_MODE)
   {
-    int mod,col;
+    int mod;
+    ptrdiff_t col;
     PCHARP end;
 
     if(f->width==SPRINTF_UNDECIDED)
@@ -744,7 +745,7 @@ INLINE static int do_one(struct format_stack *fs,
 	  PEEK_SVALUE(sv);						      \
 	  if(sv->type == T_OBJECT && sv->u.object->prog)		      \
 	  {                                                                   \
-            int fun=FIND_LFUN(sv->u.object->prog, LFUN__SPRINTF);	      \
+            ptrdiff_t fun=FIND_LFUN(sv->u.object->prog, LFUN__SPRINTF);	      \
 	    if (fun != -1)                                                    \
             {                                                                 \
               int n=0;							      \
@@ -810,7 +811,7 @@ static void low_pike_sprintf(struct format_stack *fs,
   int tmp,setwhat,pos,d,e;
   char buffer[140];
   struct format_info *f,*start;
-  float tf;
+  double tf;
   struct svalue *arg=0;	/* pushback argument */
   struct svalue *lastarg=0;
 
@@ -1066,7 +1067,8 @@ static void low_pike_sprintf(struct format_stack *fs,
 
       case 'c':
       {
-        INT32 l,tmp,n;
+        INT32 tmp;
+	ptrdiff_t l,n;
 	char *x;
         DO_OP();
 	CHECK_OBJECT_SPRINTF()
@@ -1207,7 +1209,7 @@ static void low_pike_sprintf(struct format_stack *fs,
 	x=(char *)xalloc(100+MAXIMUM(fs->fsp->precision,3));
 	fs->fsp->b=MKPCHARP(x,0);
 	sprintf(buffer,"%%*.*%c",EXTRACT_PCHARP(a));
-	GET_FLOAT(DO_NOT_WARN(tf));
+	GET_FLOAT(tf);
 
 	if(fs->fsp->precision<0) {
 	  double m=pow(10.0, (double)fs->fsp->precision);
@@ -1242,11 +1244,8 @@ static void low_pike_sprintf(struct format_stack *fs,
 
       case 'F':
       {
-        INT32 l;
+        ptrdiff_t l;
 	char *x;
-#if defined(DOUBLE_IS_IEEE_LITTLE) || defined(DOUBLE_IS_IEEE_BIG)
-	double td;
-#endif
         DO_OP();
         l=4;
         if(fs->fsp->width > 0) l=fs->fsp->width;
@@ -1255,40 +1254,41 @@ static void low_pike_sprintf(struct format_stack *fs,
 	x=(char *)alloca(l);
 	fs->fsp->b=MKPCHARP(x,0);
 	fs->fsp->len=l;
-	GET_FLOAT(DO_NOT_WARN(tf));
+	GET_FLOAT(tf);
 	switch(l) {
 	case 4:
+	  {
 #ifdef FLOAT_IS_IEEE_BIG
-	  MEMCPY(x, &tf, 4);
+	    float f = DO_NOT_WARN((float)tf);
+	    MEMCPY(x, &f, 4);
 #else
 #ifdef FLOAT_IS_IEEE_LITTLE
-	  x[0] = ((char *)&tf)[3];
-	  x[1] = ((char *)&tf)[2];
-	  x[2] = ((char *)&tf)[1];
-	  x[3] = ((char *)&tf)[0];
+	    float f = DO_NOT_WARN((float)tf);
+	    x[0] = ((char *)&f)[3];
+	    x[1] = ((char *)&f)[2];
+	    x[2] = ((char *)&f)[1];
+	    x[3] = ((char *)&f)[0];
 #else
-	  low_write_IEEE_float(x, (double)tf, 4);
+	    low_write_IEEE_float(x, tf, 4);
 #endif
 #endif
+	  }
 	  break;
 	case 8:
 #ifdef DOUBLE_IS_IEEE_BIG
-	  td = (double)tf;
-	  MEMCPY(x, &td, 8);
+	  MEMCPY(x, &tf, 8);
 #else
 #ifdef DOUBLE_IS_IEEE_LITTLE
-	  td = (double)tf;
-
-	  x[0] = ((char *)&td)[7];
-	  x[1] = ((char *)&td)[6];
-	  x[2] = ((char *)&td)[5];
-	  x[3] = ((char *)&td)[4];
-	  x[4] = ((char *)&td)[3];
-	  x[5] = ((char *)&td)[2];
-	  x[6] = ((char *)&td)[1];
-	  x[7] = ((char *)&td)[0];
+	  x[0] = ((char *)&tf)[7];
+	  x[1] = ((char *)&tf)[6];
+	  x[2] = ((char *)&tf)[5];
+	  x[3] = ((char *)&tf)[4];
+	  x[4] = ((char *)&tf)[3];
+	  x[5] = ((char *)&tf)[2];
+	  x[6] = ((char *)&tf)[1];
+	  x[7] = ((char *)&tf)[0];
 #else
-	  low_write_IEEE_float(x, (double)tf, 8);
+	  low_write_IEEE_float(x, tf, 8);
 #endif
 #endif
 	}
@@ -1337,7 +1337,8 @@ static void low_pike_sprintf(struct format_stack *fs,
     if(((f->flags & INVERSE_COLUMN_MODE) && !f->column_width) ||
        (f->flags & COLUMN_MODE))
     {
-      int max_len,nr,columns;
+      int max_len,nr;
+      ptrdiff_t columns;
       tmp=1;
       for(max_len=nr=e=0;e<f->len;e++)
       {