[Monetdb-developers] radix.mx signed/unsigned issue?

Fabian Groffen Fabian.Groffen at cwi.nl
Sat Jun 17 20:57:43 CEST 2006


I just tried to compile MonetDB 4 and hit a compiler warning (error) in
radix.mx on a signed/unsigned comparison.  I applied the attached patch
to make it compiling again, but I'm not sure if this is the intention,
as the hard cast might result in the wrong result perhaps?

Also, am I the only one experiencing this problem?
-------------- next part --------------
Index: radix.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/modules/plain/radix.mx,v
retrieving revision 1.95
diff -u -r1.95 radix.mx
--- radix.mx	17 Jun 2006 16:24:36 -0000	1.95
+++ radix.mx	17 Jun 2006 18:53:43 -0000
@@ -3625,7 +3625,7 @@
 Mem2Cache(int *__r from, size_t size)
 {
 	char *data = (char *) from;
-	int i;
+	size_t i;
 
 	for (i = 0; i < size; i += 64) {
 #ifndef __GNUC__
@@ -3635,7 +3635,7 @@
 #endif
 		data += 64;
 	}
-	return i;
+	return (int)i;
 }
 #else
 


More information about the developers-list mailing list