Changeset: 392df807288a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/392df807288a
Modified Files:
        monetdb5/modules/mal/pp_hash.c
Branch: default
Log Message:

add some more casts


diffs (24 lines):

diff --git a/monetdb5/modules/mal/pp_hash.c b/monetdb5/modules/mal/pp_hash.c
--- a/monetdb5/modules/mal/pp_hash.c
+++ b/monetdb5/modules/mal/pp_hash.c
@@ -3652,15 +3652,16 @@ OAHASHexpand3(Client ctx, MalBlkPtr mbp,
        if (selcnt && (ht->empty == 0)) {
                /* ht->last marks the maximal possible value in ht->gids, but 
we need
                 * to go over all of ht->size to find the gids. */
-               allgids = GDKzalloc(ht->last * sizeof(gid));
+               allgids = GDKzalloc((size_t)ht->last * sizeof(gid));
                if (!allgids) {
                        err = createException(SQL, "oahash.expand", 
SQLSTATE(HY013) MAL_MALLOC_FAIL);
                        goto error;
                }
+               oid *hgids = (oid*)ht->gids;
                TIMEOUT_LOOP_IDX_DECL(i, ht->size, qry_ctx) {
-                       if(ht->gids[i]) {
-                               assert(ht->gids[i] < ht->last);
-                               allgids[hpcnt++] = ht->gids[i] -1;
+                       if(hgids[i]) {
+                               assert(hgids[i] < ht->last);
+                               allgids[hpcnt++] = hgids[i] -1;
                        }
                }
 
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to