Changeset: 04208a32f6da for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=04208a32f6da
Modified Files:
monetdb5/modules/mal/mosaic_dict.c
monetdb5/modules/mal/mosaic_linear.c
monetdb5/modules/mal/mosaic_rle.c
monetdb5/modules/mal/mosaic_zone.c
Branch: mosaic
Log Message:
fixed changeset e00d257dcdad: we need to cast values after pointer derefencing,
rather than cast pointers!
diffs (48 lines):
diff --git a/monetdb5/modules/mal/mosaic_dict.c
b/monetdb5/modules/mal/mosaic_dict.c
--- a/monetdb5/modules/mal/mosaic_dict.c
+++ b/monetdb5/modules/mal/mosaic_dict.c
@@ -85,7 +85,7 @@ MOSdump_dict(Client cntxt, MOStask task)
#ifdef HAVE_HGE
case TYPE_hge:
for(i=0; i< *size; i++)
- mnstr_printf(cntxt->fdout,"hge [%d] %.40g", i, ((dbl*)
val)[i]); break;
+ mnstr_printf(cntxt->fdout,"hge [%d] %.40g", i, (dbl) ((hge*)
val)[i]); break;
#endif
case TYPE_wrd:
for(i=0; i< *size; i++)
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
@@ -65,7 +65,7 @@ MOSdump_linear(Client cntxt, MOStask tas
mnstr_printf(cntxt->fdout,"int "LLFMT" " LLFMT, *(lng*)
linear_base(blk), *(lng*) linear_step(task,blk)); break;
#ifdef HAVE_HGE
case TYPE_hge:
- mnstr_printf(cntxt->fdout,"int %.40g %.40g ", *(dbl*)
linear_base(blk), *(dbl*) linear_step(task,blk)); break;
+ mnstr_printf(cntxt->fdout,"int %.40g %.40g ", (dbl) *(hge*)
linear_base(blk), (dbl) *(hge*) linear_step(task,blk)); break;
#endif
case TYPE_wrd:
mnstr_printf(cntxt->fdout,"int "SZFMT" " SZFMT, *(wrd*)
linear_base(blk), *(wrd*) linear_step(task,blk)); break;
diff --git a/monetdb5/modules/mal/mosaic_rle.c
b/monetdb5/modules/mal/mosaic_rle.c
--- a/monetdb5/modules/mal/mosaic_rle.c
+++ b/monetdb5/modules/mal/mosaic_rle.c
@@ -47,7 +47,7 @@ MOSdump_rle(Client cntxt, MOStask task)
mnstr_printf(cntxt->fdout,"lng "LLFMT, *(lng*) val); break;
#ifdef HAVE_HGE
case TYPE_hge:
- mnstr_printf(cntxt->fdout,"hge %.40g", *(dbl*) val); break;
+ mnstr_printf(cntxt->fdout,"hge %.40g", (dbl) *(hge*) val);
break;
#endif
case TYPE_wrd:
mnstr_printf(cntxt->fdout,"wrd "SZFMT, *(wrd*) val); break;
diff --git a/monetdb5/modules/mal/mosaic_zone.c
b/monetdb5/modules/mal/mosaic_zone.c
--- a/monetdb5/modules/mal/mosaic_zone.c
+++ b/monetdb5/modules/mal/mosaic_zone.c
@@ -42,7 +42,7 @@ MOSdump_zone(Client cntxt, MOStask task)
case TYPE_oid: {oid low= *(oid*)zone_min(blk), max =*(oid*)
zone_max(blk); mnstr_printf(cntxt->fdout," ["LLFMT" - "LLFMT"]\n", low,max);
}break;
case TYPE_lng: {lng low= *(lng*)zone_min(blk), max =*(lng*)
zone_max(blk); mnstr_printf(cntxt->fdout," ["LLFMT" - "LLFMT"]\n", low,max);
}break;
#ifdef HAVE_HGE
- case TYPE_hge: {dbl low= *(dbl*)zone_min(blk), max =*(dbl*)
zone_max(blk); mnstr_printf(cntxt->fdout," [%.40g -%.40g]\n", low,max); }break;
+ case TYPE_hge: {hge low= *(hge*)zone_min(blk), max =*(hge*)
zone_max(blk); mnstr_printf(cntxt->fdout," [%.40g -%.40g]\n", (dbl) low, (dbl)
max); }break;
#endif
case TYPE_wrd: {wrd low= *(wrd*)zone_min(blk), max =*(wrd*)
zone_max(blk); mnstr_printf(cntxt->fdout," ["SZFMT" - "SZFMT"]\n", low,max);
}break;
case TYPE_flt: {flt low= *(flt*)zone_min(blk), max =*(flt*)
zone_max(blk); mnstr_printf(cntxt->fdout," [%f - %f]\n", low,max); }break;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list