diff --git a/src/cyclic.h b/src/cyclic.h
index 7a0fcd8ac71bf1c976238edfd61b18d1f1f56526..2793a964c030725f2fb58e519aaa5619a72516da 100644
--- a/src/cyclic.h
+++ b/src/cyclic.h
@@ -1,5 +1,5 @@
 /*
- * $Id: cyclic.h,v 1.3 1998/03/28 15:34:38 grubba Exp $
+ * $Id: cyclic.h,v 1.4 2000/08/14 20:18:29 grubba Exp $
  */
 #ifndef CYCLIC_H
 #define CYCLIC_H
@@ -22,7 +22,8 @@ typedef struct CYCLIC
   CYCLIC cyclic_struct__
 
 #define BEGIN_CYCLIC(A,B) \
-   begin_cyclic(&cyclic_struct__, &cyclic_identifier__, (void *)th_self(), (void *)(A), (void *)(B))
+   begin_cyclic(&cyclic_struct__, &cyclic_identifier__, \
+                (void *)(ptrdiff_t)th_self(), (void *)(A), (void *)(B))
 
 #define SET_CYCLIC_RET(RET) \
    cyclic_struct__.ret=(void *)(RET)
diff --git a/src/program.h b/src/program.h
index 5f3b463dafe10abd705b5cc94951df3f7736a834..6b812b6f8f8144fa16d2c6605ad93b00f4f6f2ce 100644
--- a/src/program.h
+++ b/src/program.h
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: program.h,v 1.100 2000/08/10 14:51:16 grubba Exp $
+ * $Id: program.h,v 1.101 2000/08/14 20:09:58 grubba Exp $
  */
 #ifndef PROGRAM_H
 #define PROGRAM_H
@@ -125,7 +125,7 @@ struct program_state;
 union idptr
 {
   void (*c_fun)(INT32);
-  INT32 offset;
+  ptrdiff_t offset;
 };
 
 #define IDENTIFIER_PIKE_FUNCTION 1
diff --git a/src/svalue.c b/src/svalue.c
index 443a1730e55ad9ed8e6e90c799fcd74fd665a050..d87557f9dd481fe72fdaf6739c00c54ce863dd0d 100644
--- a/src/svalue.c
+++ b/src/svalue.c
@@ -24,7 +24,7 @@
 #include "queue.h"
 #include "bignum.h"
 
-RCSID("$Id: svalue.c,v 1.85 2000/07/28 17:16:55 hubbe Exp $");
+RCSID("$Id: svalue.c,v 1.86 2000/08/14 20:08:29 grubba Exp $");
 
 struct svalue dest_ob_zero = { T_INT, 0 };
 
@@ -258,7 +258,9 @@ PMOD_EXPORT void assign_svalues_no_free(struct svalue *to,
     size_t e;
     for(e=0;e<num;e++)
       if(!(type_hint & (1<<from[e].type)))
-	 fatal("Type hint lies (%ld %ld %d)!\n",(long)e,(long)type_hint,from[e].type);
+	 fatal("Type hint lies (%ld %ld %d)!\n",
+	       DO_NOT_WARN((long)e),
+	       (long)type_hint, from[e].type);
   }
 #endif
   if((type_hint & ((2<<MAX_REF_TYPE)-1)) == 0)
@@ -440,9 +442,13 @@ PMOD_EXPORT unsigned INT32 hash_svalue(struct svalue *s)
       break;
     }
 
-  default:      q=(unsigned INT32)((long)s->u.refs >> 2); break;
+  default:
+    q=DO_NOT_WARN((unsigned INT32)((ptrdiff_t)s->u.refs >> 2));
+    break;
   case T_INT:   q=s->u.integer; break;
-  case T_FLOAT: q=(unsigned INT32)(s->u.float_number * 16843009.731757771173); break;
+  case T_FLOAT:
+    q=DO_NOT_WARN((unsigned INT32)(s->u.float_number * 16843009.731757771173));
+    break;
   }
   q+=q % 997;
   q+=((q + s->type) * 9248339);
@@ -1211,7 +1217,7 @@ static void low_check_short_svalue(union anything *u, TYPE_T type)
 
 void check_short_svalue(union anything *u, TYPE_T type)
 {
-  if(type<=MAX_REF_TYPE && (3 & (long)(u->refs)))
+  if(type<=MAX_REF_TYPE && (3 & (ptrdiff_t)(u->refs)))
     fatal("Odd pointer! type=%d u->refs=%p\n",type,u->refs);
 
   check_refs2(u,type);
@@ -1221,7 +1227,7 @@ void check_short_svalue(union anything *u, TYPE_T type)
 void debug_check_svalue(struct svalue *s)
 {
   check_type(s->type);
-  if(s->type<=MAX_REF_TYPE && (3 & (long)(s->u.refs)))
+  if(s->type<=MAX_REF_TYPE && (3 & (ptrdiff_t)(s->u.refs)))
     fatal("Odd pointer! type=%d u->refs=%p\n",s->type,s->u.refs);
 
   check_refs(s);
@@ -1578,7 +1584,8 @@ PMOD_EXPORT INT32 pike_sizeof(struct svalue *s)
 {
   switch(s->type)
   {
-  case T_STRING: return s->u.string->len;
+  case T_STRING:
+    return DO_NOT_WARN((INT32)s->u.string->len);
   case T_ARRAY: return s->u.array->size;
   case T_MAPPING: return m_sizeof(s->u.mapping);
   case T_MULTISET: return l_sizeof(s->u.multiset);