[kaffe] CVS kaffe (robilad): fixed compiler warnings

Kaffe CVS cvs-commits at kaffe.org
Wed Feb 20 14:19:48 PST 2008


PatchSet 7764 
Date: 2008/02/20 22:17:55
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fixed compiler warnings

2008-02-20  Dalibor Topic  <robilad at kaffe.org>

* kaffe/kaffevm/debug.c (kaffe_dprintf): Added missing casts to n.

Members: 
	ChangeLog:1.5264->1.5265 
	kaffe/kaffevm/debug.c:1.68->1.69 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5264 kaffe/ChangeLog:1.5265
--- kaffe/ChangeLog:1.5264	Wed Feb 20 14:29:07 2008
+++ kaffe/ChangeLog	Wed Feb 20 22:17:55 2008
@@ -1,5 +1,9 @@
 2008-02-20  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/debug.c (kaffe_dprintf): Added missing casts to n.
+
+2008-02-20  Dalibor Topic  <robilad at kaffe.org>
+
 	* TODO: Updated.
 
 	* include/Makefile.am (MAYBE_ZLIB_ZIP_HDRS): Removed unused headers.
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.68 kaffe/kaffe/kaffevm/debug.c:1.69
--- kaffe/kaffe/kaffevm/debug.c:1.68	Thu Jan 31 20:49:47 2008
+++ kaffe/kaffe/kaffevm/debug.c	Wed Feb 20 22:17:59 2008
@@ -444,7 +444,7 @@
 	n = vsnprintf(debugBuffer + bufferBegin, max, fmt, args);
 
 	/* The return value is bytes *needed* not bytes *used* */
-	if (n > max)
+	if (n > 0 && (size_t )n > max)
 		n = max;
 #else
 	n = vsprintf(debugBuffer + bufferBegin, fmt, args);
@@ -461,7 +461,7 @@
 		 * defintions?
 		 */
 		max = 0;
-		while (max < n) {
+		while (max < (size_t) n) {
                         w = write(kaffe_dprintf_fd,
                                        debugBuffer + max,
                                        (size_t)n - max);




More information about the kaffe mailing list