[kaffe] CVS kaffe (dalibor): Fixed compiler warnings on sparc-netbsd about point arithmethics

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Fri Mar 19 10:06:02 2004


PatchSet 4540 
Date: 2004/03/19 18:03:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed compiler warnings on sparc-netbsd about point arithmethics

2004-03-19  Dalibor Topic <robilad@kaffe.org>

        * kaffe/kaffevm/gcFuncs.c,
        kaffe/kaffevm/mem/gc-incremental.c,
        kaffe/kaffevm/mem/gc-mem.c:
        Cast void * to char * before doing arithmetic on them.

Members: 
	ChangeLog:1.2118->1.2119 
	kaffe/kaffevm/gcFuncs.c:1.50->1.51 
	kaffe/kaffevm/mem/gc-incremental.c:1.72->1.73 
	kaffe/kaffevm/mem/gc-mem.c:1.52->1.53 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2118 kaffe/ChangeLog:1.2119
--- kaffe/ChangeLog:1.2118	Thu Mar 18 10:15:58 2004
+++ kaffe/ChangeLog	Fri Mar 19 18:03:02 2004
@@ -1,3 +1,10 @@
+2004-03-19  Dalibor Topic <robilad@kaffe.org>
+
+	* kaffe/kaffevm/gcFuncs.c,
+	kaffe/kaffevm/mem/gc-incremental.c,
+	kaffe/kaffevm/mem/gc-mem.c:
+	Cast void * to char * before doing arithmetic on them.
+
 2004-03-18  Dalibor Topic <robilad@kaffe.org>
 
 	* libraries/javalib/essential.files,
Index: kaffe/kaffe/kaffevm/gcFuncs.c
diff -u kaffe/kaffe/kaffevm/gcFuncs.c:1.50 kaffe/kaffe/kaffevm/gcFuncs.c:1.51
--- kaffe/kaffe/kaffevm/gcFuncs.c:1.50	Mon Mar  8 21:21:08 2004
+++ kaffe/kaffe/kaffevm/gcFuncs.c	Fri Mar 19 18:03:04 2004
@@ -463,7 +463,7 @@
 DBG(GCPRECISE,
         dprintf("walkObject `%s' ", CLASS_CNAME(clazz));
         BITMAP_DUMP(layout, nbits)
-        dprintf(" (nbits=%d) %p-%p\n", nbits, base, base+size);
+        dprintf(" (nbits=%d) %p-%p\n", nbits, base, ((char *)base) + size);
     )
 
         assert(CLASS_FSIZE(clazz) > 0);
Index: kaffe/kaffe/kaffevm/mem/gc-incremental.c
diff -u kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.72 kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.73
--- kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.72	Mon Mar  8 21:21:13 2004
+++ kaffe/kaffe/kaffevm/mem/gc-incremental.c	Fri Mar 19 18:03:04 2004
@@ -322,7 +322,7 @@
 
 DBG(GCWALK,	
 	dprintf("scanning %d bytes conservatively from %p-%p\n", 
-		size, base, base+size);
+		size, base, ((char *)base) + size);
     )
 
 	record_marked(1, size);
Index: kaffe/kaffe/kaffevm/mem/gc-mem.c
diff -u kaffe/kaffe/kaffevm/mem/gc-mem.c:1.52 kaffe/kaffe/kaffevm/mem/gc-mem.c:1.53
--- kaffe/kaffe/kaffevm/mem/gc-mem.c:1.52	Sun Feb  8 17:23:25 2004
+++ kaffe/kaffe/kaffevm/mem/gc-mem.c	Fri Mar 19 18:03:04 2004
@@ -525,8 +525,8 @@
 	GC_SET_STATE(info, nr-1, GC_STATE_NORMAL);
 	info->free = GCBLOCK2FREE(info, 0);
 DBG(SLACKANAL,
-	int slack = ((void *)info) 
-		+ gc_pgsize - (void *)(GCBLOCK2MEM(info, nr));
+	int slack = ((char *)info) 
+		+ gc_pgsize - (char *)(GCBLOCK2MEM(info, nr));
 	totalslack += slack;
     )
 	return (info);