[Monetdb-developers] MonetDB: default - fix compilation failure opt_mapreduce.mx:141:...

Sjoerd Mullender sjoerd at acm.org
Thu Jun 10 11:13:50 CEST 2010


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 at monetdb.org
> http://mail.monetdb.org/mailman/listinfo/checkin-list


-- 
Sjoerd Mullender

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 371 bytes
Desc: OpenPGP digital signature
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20100610/1fad5356/attachment.sig>


More information about the developers-list mailing list