Changeset: 5186caddb826 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5186caddb826
Modified Files:
monetdb5/modules/mal/mosaic_dictionary.c
monetdb5/modules/mal/mosaic_frame.c
monetdb5/modules/mal/mosaic_linear.c
Branch: mosaic
Log Message:
fix compilation issues
diffs (76 lines):
diff --git a/monetdb5/modules/mal/mosaic_dictionary.c
b/monetdb5/modules/mal/mosaic_dictionary.c
--- a/monetdb5/modules/mal/mosaic_dictionary.c
+++ b/monetdb5/modules/mal/mosaic_dictionary.c
@@ -423,15 +423,15 @@ MOScompress_dictionary(Client cntxt, MOS
// the inverse operator, extend the src
#define dictdecompress(I)\
-cid = (I * hdr->bits)/64;\
+cid = (int) (I * hdr->bits)/64;\
lshift= 63 -((I * hdr->bits) % 64) ;\
if ( lshift >= hdr->bits){\
- j = (base[cid]>> (lshift-hdr->bits)) & ((unsigned long)hdr->mask);\
+ j =(unsigned short)( (base[cid]>> (lshift-hdr->bits)) & ((unsigned
long)hdr->mask));\
}else{ \
rshift= 63 - ((I+1) * hdr->bits) % 64;\
m1 = (base[cid] & ( ((unsigned long)hdr->mask) >> (hdr->bits-lshift)));\
m2 = (base[cid+1] >>rshift) & 0377;\
- j= ((m1 <<(hdr->bits-lshift)) | m2) & 0377;\
+ j= (unsigned short)( ((m1 <<(hdr->bits-lshift)) | m2) & 0377);\
}
#define DICTdecompress(TPE)\
diff --git a/monetdb5/modules/mal/mosaic_frame.c
b/monetdb5/modules/mal/mosaic_frame.c
--- a/monetdb5/modules/mal/mosaic_frame.c
+++ b/monetdb5/modules/mal/mosaic_frame.c
@@ -437,15 +437,15 @@ MOScompress_frame(Client cntxt, MOStask
// the inverse operator, extend the src
#define framedecompress(I)\
-cid = (I * hdr->framebits)/64;\
+cid = (int) (I * hdr->framebits)/64;\
lshift= 63 -((I * hdr->framebits) % 64) ;\
if ( lshift >= hdr->framebits){\
- j = (base[cid]>> (lshift-hdr->framebits)) & ((unsigned long)hdr->mask);\
+ j = (unsigned int)( (base[cid]>> (lshift-hdr->framebits)) & ((unsigned
long)hdr->mask));\
}else{ \
rshift= 63 - ((I+1) * hdr->framebits) % 64;\
m1 = (base[cid] & ( ((unsigned long)hdr->mask) >>
(hdr->framebits-lshift)));\
m2 = base[cid+1] >>rshift;\
- j= ((m1 <<(hdr->framebits-lshift)) | m2) & 0377;\
+ j= (unsigned int) ( ((m1 <<(hdr->framebits-lshift)) | m2) & 0377);\
}
#define FRAMEdecompress(TPE)\
@@ -492,16 +492,16 @@ MOSdecompress_frame(Client cntxt, MOStas
for(i = 0; i < lim; i++){
//mnstr_printf(cntxt->fdout,"decompress
["BUNFMT"] val "LLFMT" framebits %d\n",i, frame,hdr->framebits);
- cid = (i * hdr->framebits)/64;
+ cid = (int)(i * hdr->framebits)/64;
lshift= 63 -((i * hdr->framebits) % 64) ;
if ( lshift >= hdr->framebits){
- j = (base[cid]>>
(lshift-hdr->framebits)) & ((unsigned long)hdr->mask);
+ j =(unsigned int)( (base[cid]>>
(lshift-hdr->framebits)) & ((unsigned long)hdr->mask));
//mnstr_printf(cntxt->fdout,"decompress
[%d] lshift %d m %d\n", cid, lshift,j);
}else{
rshift= 63 - ((i+1) * hdr->framebits)
% 64;
m1 = (base[cid] & ( ((unsigned
long)hdr->mask) >> (hdr->framebits-lshift)));
m2 = (base[cid+1] >>rshift);
- j= ((m1 <<(hdr->framebits-lshift)) |
m2) & 0377;\
+ j= (unsigned int) ( ((m1
<<(hdr->framebits-lshift)) | m2) & 0377);
//mnstr_printf(cntxt->fdout,"decompress
[%d] shift %d %d val "LLFMT"cid %lo %lo idx %d\n", cid, lshift,
rshift,frame,base[cid],base[cid+1], j);
}
hdr->checksum2.sumint += dict[j];
diff --git a/monetdb5/modules/mal/mosaic_linear.c
b/monetdb5/modules/mal/mosaic_linear.c
--- a/monetdb5/modules/mal/mosaic_linear.c
+++ b/monetdb5/modules/mal/mosaic_linear.c
@@ -311,7 +311,7 @@ MOScompress_linear(Client cntxt, MOStask
TYPE step = *(TYPE*) linear_step(task,blk);\
BUN lim = MOSgetCnt(blk);\
for(i = 0; i < lim; i++) {\
- ((TYPE*)task->src)[i] = val + (int) i * step;\
+ ((TYPE*)task->src)[i] = val + (TYPE) (i * step);\
hdr->checksum2.sum##TYPE += ((TYPE*)task->src)[i];\
}\
task->src += i * sizeof(TYPE);\
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list