[kaffe] CVS kaffe (jim): Fix for previous warnings fix (which broke UNIXProcess).

Kaffe CVS cvs-commits at kaffe.org
Fri Sep 5 16:24:02 PDT 2003


PatchSet 4021 
Date: 2003/09/05 23:12:54
Author: jim
Branch: HEAD
Tag: (none) 
Log:
Fix for previous warnings fix (which broke UNIXProcess).

Members: 
	ChangeLog:1.1617->1.1618 
	include/kaffe/jmalloc.h:1.2->1.3 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1617 kaffe/ChangeLog:1.1618
--- kaffe/ChangeLog:1.1617	Fri Sep  5 17:56:52 2003
+++ kaffe/ChangeLog	Fri Sep  5 23:12:54 2003
@@ -1,3 +1,10 @@
+2003-09-05  Jim Pick  <jim at kaffe.org>
+
+	* include/kaffe/jmalloc.h:
+	Oops, my gcc 3.3 warning fix was braindamaged - I broke freevec() in
+	UNIXProcess.c (and probably other things too).  Try doing it with an
+	inlined function instead of a macro. 
+
 2003-09-05  Guilhem Lavaux <guilhem at kaffe.org>
 
 	* libraries/javalib/java/net/InetSocketAddress.java:
Index: kaffe/include/kaffe/jmalloc.h
diff -u kaffe/include/kaffe/jmalloc.h:1.2 kaffe/include/kaffe/jmalloc.h:1.3
--- kaffe/include/kaffe/jmalloc.h:1.2	Mon Sep  1 19:34:51 2003
+++ kaffe/include/kaffe/jmalloc.h	Fri Sep  5 23:12:55 2003
@@ -29,12 +29,14 @@
 #define KFREE(p)	jfree((void *)(p))
 
 #ifdef KAFFE_VMDEBUG
-/* Does anybody know why we are doing this? */
+/* Clear pointers after freeing the data, 
+ * to aid debugging.
+ * */
 #undef KFREE
-#define KFREE(p)	do {			\
-	jfree ((void *)p);			\
-	p = (void *)0;				\
-} while (0)
+static inline void KFREE(void *p) {
+	jfree ((void *)p);
+	p = (void *)0;
+}
 #endif
 
 #endif




More information about the kaffe mailing list