Re: [Monetdb-developers] MonetDB: default - fix compilation failure opt_mapreduce.mx:141:...
Why not fix this "properly" by changing the type of cnt (and the function return value and several other variables)? At the very least you could have an assert to check that the value fits in an int. On 2010-06-10 10:54, Fabian Groffen wrote:
Changeset: 820a7637cf5e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=820a7637cf5e Modified Files: MonetDB5/src/optimizer/opt_mapreduce.mx Branch: default Log Message:
fix compilation failure opt_mapreduce.mx:141: '=' : conversion from 'size_t' to 'int', possible loss of data
diffs (12 lines):
diff -r c7d1cd0d0bbb -r 820a7637cf5e MonetDB5/src/optimizer/opt_mapreduce.mx --- a/MonetDB5/src/optimizer/opt_mapreduce.mx Wed Jun 09 15:30:45 2010 +0200 +++ b/MonetDB5/src/optimizer/opt_mapreduce.mx Thu Jun 10 10:54:23 2010 +0200 @@ -138,7 +138,7 @@ return 0; } cloud = BATdescriptor(bid); - cnt = BATcount(cloud); + cnt = (int)BATcount(cloud); BBPreleaseref(bid); /* we're done with it */ return(cnt); } _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender
On 10-06-2010 11:13:50 +0200, Sjoerd Mullender wrote:
Why not fix this "properly" by changing the type of cnt (and the function return value and several other variables)? At the very least you could have an assert to check that the value fits in an int.
Because the code shouldn't have used a BAT at all, as it was originally.
participants (2)
-
Fabian Groffen
-
Sjoerd Mullender