Changeset: 677358b5dcdf for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/677358b5dcdf
Modified Files:
        monetdb5/modules/mal/pipeline.c
        monetdb5/modules/mal/pp_mat.c
Branch: pp_hashjoin
Log Message:

more cast fixes


diffs (60 lines):

diff --git a/monetdb5/modules/mal/pipeline.c b/monetdb5/modules/mal/pipeline.c
--- a/monetdb5/modules/mal/pipeline.c
+++ b/monetdb5/modules/mal/pipeline.c
@@ -36,7 +36,7 @@ BATupgrade(BAT *r, BAT *b, bool locked)
                if (locked)
                        MT_lock_unset(&r->theaplock);
                if (r->twidth < b->twidth)
-                       err = GDKupgradevarheap(r, (1L << (8L << (b->tshift - 
1))) + GDK_VAROFFSET, 0, 0) != GDK_SUCCEED;
+                       err = GDKupgradevarheap(r, (LL_CONSTANT(1) << (8 << 
(b->tshift - 1))) + GDK_VAROFFSET, 0, 0) != GDK_SUCCEED;
                if (locked)
                        MT_lock_set(&r->theaplock);
                assert (r->twidth == b->twidth);
diff --git a/monetdb5/modules/mal/pp_mat.c b/monetdb5/modules/mal/pp_mat.c
--- a/monetdb5/modules/mal/pp_mat.c
+++ b/monetdb5/modules/mal/pp_mat.c
@@ -133,7 +133,7 @@ MATnew(Client cntxt, MalBlkPtr mb, MalSt
                        break;
                BATnegateprops(b);
                if (hashsize)
-                       b->tsink = (Sink*)ht_create(tt, hashsize*1.2*2.1, 
pmat?(hash_table*)pmat->bat[i]->tsink:NULL);
+                       b->tsink = (Sink*)ht_create(tt, 
(size_t)(hashsize*1.2*2.1), pmat?(hash_table*)pmat->bat[i]->tsink:NULL);
        }
        if (i < mat->nr) {
                mat_destroy(mat);
@@ -285,7 +285,7 @@ PARTpartition(Client ctx, bat *pos, cons
                        if (err == NULL) {                                      
                        \
                                T *dp = (T*)Tloc(d, 0);                         
                \
                                for(BUN i = 0; i<BATcount(d); i++) {            
\
-                                       int g = grp[i];                         
                        \
+                                       lng g = grp[i];                         
                        \
                                        cp[g][curpos[g]] = dp[i];               
                \
                                        curpos[g]++;                            
                        \
                                }                                               
                                        \
@@ -314,7 +314,7 @@ PARTpartition(Client ctx, bat *pos, cons
                        BATiter di = bat_iterator(d); \
                        BUN cnt = BATcount(d); \
                        TIMEOUT_LOOP_IDX_DECL(i, cnt, qry_ctx) { \
-                               int g = grp[i];                                 
        \
+                               lng g = grp[i];                                 
        \
                                if (tfastins_nocheckVAR( mt->bat[g], curpos[g], 
BUNtvar(&di, i)) != GDK_SUCCEED) { \
                                        err = createException(MAL, "pp 
algebra.projection", MAL_MALLOC_FAIL); \
                                        goto error; \
@@ -518,7 +518,7 @@ MATnr_parts(Client ctx, int *nr, const b
        assert(mt->s.type == MAT_SINK);
        int n = 0;
        for(int i = 0; i< mt->nr; i++) {
-               n += (BATcount(mt->bat[i]) + sz - 1)/sz;
+               n += (int)((BATcount(mt->bat[i]) + sz - 1)/sz);
                mt->bat[i] = BATsetaccess(mt->bat[i], BAT_READ);
        }
        mt->nr_parts = n;
@@ -528,7 +528,7 @@ MATnr_parts(Client ctx, int *nr, const b
        if (!mt->part || !mt->subpart)
                throw(MAL, "mat.nr_parts", SQLSTATE(HY002) 
RUNTIME_OBJECT_MISSING);
        for(int i = 0, k = 0; i<mt->nr; i++) {
-               int nr = (BATcount(mt->bat[i]) + sz - 1)/sz;
+               int nr = (int)((BATcount(mt->bat[i]) + sz - 1)/sz);
                for(int j = 0; j < nr; j++, k++) {
                        mt->part[k] = i;
                        mt->subpart[k] = j;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to