[kaffe] CVS kaffe (robilad): Small warning fix for gc-mem.c

Kaffe CVS cvs-commits at kaffe.org
Sat Aug 20 15:39:05 PDT 2005


PatchSet 6855 
Date: 2005/08/20 22:33:54
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Small warning fix for gc-mem.c

2005-08-20  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/gc.h: Include config.h and limits.h.
        (UNLIMITED_HEAP) Set to MAX_ULONG to fix signedness warnings.

        * kaffe/kaffe/version.c (printShortVersion): Use
        %lu for MAXHEAPSIZE.

Members: 
	ChangeLog:1.4377->1.4378 
	kaffe/kaffe/version.c:1.15->1.16 
	kaffe/kaffevm/gc.h:1.34->1.35 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4377 kaffe/ChangeLog:1.4378
--- kaffe/ChangeLog:1.4377	Sat Aug 20 20:10:18 2005
+++ kaffe/ChangeLog	Sat Aug 20 22:33:54 2005
@@ -1,5 +1,13 @@
 2005-08-20  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/gc.h: Include config.h and limits.h.
+	(UNLIMITED_HEAP) Set to MAX_ULONG to fix signedness warnings.
+
+	* kaffe/kaffe/version.c (printShortVersion): Use
+	%lu for MAXHEAPSIZE.
+
+2005-08-20  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/kaffe-gc/gc-mem.c (gc_heap_is_unlimited):
 	New static function.
 	(gc_heap_initialise, gc_heap_grow) Use gc_heap_is_unlimited.
Index: kaffe/kaffe/kaffe/version.c
diff -u kaffe/kaffe/kaffe/version.c:1.15 kaffe/kaffe/kaffe/version.c:1.16
--- kaffe/kaffe/kaffe/version.c:1.15	Mon Aug 15 01:55:16 2005
+++ kaffe/kaffe/kaffe/version.c	Sat Aug 20 22:34:01 2005
@@ -58,7 +58,7 @@
 		fprintf(versionfd, _("Heap defaults: minimum size: %d MB, maximum size: unlimited\n"),
 			MIN_HEAPSIZE / (1024*1024)); 
 	} else {
-		fprintf(versionfd, _("Heap defaults: minimum size: %d MB, maximum size: %d MB\n"),
+		fprintf(versionfd, _("Heap defaults: minimum size: %d MB, maximum size: %lu MB\n"),
 			MIN_HEAPSIZE / (1024*1024), MAX_HEAPSIZE / (1024*1024));
 	}
 	fprintf(versionfd, _("Stack default size: %d KB\n"), THREADSTACKSIZE / 1024);
Index: kaffe/kaffe/kaffevm/gc.h
diff -u kaffe/kaffe/kaffevm/gc.h:1.34 kaffe/kaffe/kaffevm/gc.h:1.35
--- kaffe/kaffe/kaffevm/gc.h:1.34	Wed Jul 13 13:31:13 2005
+++ kaffe/kaffe/kaffevm/gc.h	Sat Aug 20 22:34:02 2005
@@ -12,12 +12,20 @@
 #ifndef __gc_h
 #define __gc_h
 
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
+
+#if defined(HAVE_LIMITS_H)
+#include <limits.h>
+#endif
+
 #include "gtypes.h"
 
 /*
  * Default values for initial and maximum heap size and heap increment.
  */
-#define UNLIMITED_HEAP  (-1)
+#define UNLIMITED_HEAP  (ULONG_MAX)
 #define	MIN_HEAPSIZE	(5*1024*1024)
 #define	MAX_HEAPSIZE	(UNLIMITED_HEAP)
 #define	ALLOC_HEAPSIZE	(1024*1024)




More information about the kaffe mailing list