From 7e1661443662268af7e1e8155c2847372012458d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Thu, 10 Aug 2000 10:42:26 +0200
Subject: [PATCH] Fixed a few warnings.

Rev: src/cpp.c:1.69
Rev: src/interpret.c:1.162
Rev: src/stralloc.h:1.51
---
 src/cpp.c       |  8 ++++----
 src/interpret.c | 13 +++++++------
 src/stralloc.h  | 11 ++++++-----
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/cpp.c b/src/cpp.c
index 9b718f1cc4..de279114ea 100644
--- a/src/cpp.c
+++ b/src/cpp.c
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: cpp.c,v 1.68 2000/08/09 13:25:10 grubba Exp $
+ * $Id: cpp.c,v 1.69 2000/08/10 08:39:37 grubba Exp $
  */
 #include "global.h"
 #include "stralloc.h"
@@ -732,9 +732,9 @@ static struct pike_string *filter_bom(struct pike_string *data)
    * * Character 0xfeff (ZERO WIDTH NO-BREAK SPACE = BYTE ORDER MARK = BOM)
    *   needs to be filtered away before processing continues.
    */
-  int i;
-  int j = 0;
-  int len = data->len;
+  ptrdiff_t i;
+  ptrdiff_t j = 0;
+  ptrdiff_t len = data->len;
   struct string_builder buf;
 
   /* Add an extra reference to data here, since we may return it as is. */
diff --git a/src/interpret.c b/src/interpret.c
index a5821d0c0f..a09c813ad5 100644
--- a/src/interpret.c
+++ b/src/interpret.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: interpret.c,v 1.161 2000/08/10 08:35:24 grubba Exp $");
+RCSID("$Id: interpret.c,v 1.162 2000/08/10 08:38:20 grubba Exp $");
 #include "interpret.h"
 #include "object.h"
 #include "program.h"
@@ -675,7 +675,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void
 {
   struct object *o;
   struct pike_frame *scope=0;
-  int fun, tailrecurse=-1;
+  int tailrecurse=-1;
+  ptrdiff_t fun;
   struct svalue *save_sp=Pike_sp-args;
 
 #ifdef PROFILING
@@ -853,8 +854,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void
   
 
   case APPLY_LOW:
-    o=(struct object *)arg1;
-    fun=(long)arg2;
+    o = (struct object *)arg1;
+    fun = (ptrdiff_t)arg2;
 
   apply_low:
     scope=0;
@@ -898,8 +899,8 @@ PMOD_EXPORT void mega_apply2(enum apply_type type, INT32 args, void *arg1, void
 #ifdef PIKE_DEBUG
       if(fun>=(int)p->num_identifier_references)
       {
-	fprintf(stderr, "Function index out of range. %d >= %d\n",
-		fun, (int)p->num_identifier_references);
+	fprintf(stderr, "Function index out of range. %ld >= %d\n",
+		(long)fun, (int)p->num_identifier_references);
 	fprintf(stderr,"########Program is:\n");
 	describe(p);
 	fprintf(stderr,"########Object is:\n");
diff --git a/src/stralloc.h b/src/stralloc.h
index 4cca570256..27bedcf3d1 100644
--- a/src/stralloc.h
+++ b/src/stralloc.h
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: stralloc.h,v 1.50 2000/08/09 18:46:31 grubba Exp $
+ * $Id: stralloc.h,v 1.51 2000/08/10 08:42:26 grubba Exp $
  */
 #ifndef STRALLOC_H
 #define STRALLOC_H
@@ -160,11 +160,12 @@ CONVERT(2,1)
 PMOD_EXPORT int generic_compare_strings(const void *a,int alen, int asize,
 			    const void *b,int blen, int bsize);
 PMOD_EXPORT void generic_memcpy(PCHARP to,
-		    PCHARP from,
-		    int len);
+				PCHARP from,
+				int len);
 PMOD_EXPORT INLINE void pike_string_cpy(PCHARP to,
-			    struct pike_string *from);
-PMOD_EXPORT struct pike_string *binary_findstring(const char *foo, INT32 l);
+					struct pike_string *from);
+PMOD_EXPORT struct pike_string *binary_findstring(const char *foo,
+						  ptrdiff_t l);
 PMOD_EXPORT struct pike_string *findstring(const char *foo);
 PMOD_EXPORT struct pike_string *debug_begin_shared_string(size_t len);
 PMOD_EXPORT struct pike_string *debug_begin_wide_shared_string(size_t len, int shift);
-- 
GitLab