Changeset: ecd17329577c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ecd17329577c
Modified Files:
        monetdb5/modules/mal/pp_hash.c
        sql/storage/bat/bat_storage.c
Branch: pp_hashjoin
Log Message:

do a value cast (incorrect but shouldn't be issue for just nil) to handle 
compiler issues


diffs (46 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
@@ -1895,12 +1895,11 @@ OAHASHnprobe(Client ctx, bat *PRB_oid, b
 
 #define BATfoprobe(Type, BaseType) \
        do { \
-               BaseType nil = *(BaseType*)&Type##_nil; \
                Type *ky = Tloc(k, 0); \
                Type *vals = ht->vals; \
                \
                if (any) { \
-                       gid k = (gid)_hash_##Type(nil)&ht->mask; \
+                       gid k = 
(gid)_hash_##Type((BaseType)Type##_nil)&ht->mask; \
                        gid slot = ht->gids[k]; \
                        while (slot && !is_##Type##_nil(vals[slot])) { \
                                k++; \
@@ -2554,7 +2553,6 @@ OAHASHprobe_cmbd(Client ctx, bat *PRB_oi
 
 #define BATfoprobe_cmbd(Type, BaseType) \
        do { \
-               BaseType nil = *(BaseType*)&Type##_nil; \
                Type *ky = Tloc(k, 0); \
                Type *vals = ht->vals; \
                \
@@ -2588,7 +2586,7 @@ OAHASHprobe_cmbd(Client ctx, bat *PRB_oi
                                slt[mtdcnt2] = oid_nil; \
                                bit has_nil = false; \
                                if (any) { \
-                                       gid hsh = (gid)combine(gi[i], 
_hash_##Type(nil), prime)&ht->mask; \
+                                       gid hsh = (gid)combine(gi[i], 
_hash_##Type((BaseType)Type##_nil), prime)&ht->mask; \
                                        slot = ATOMIC_GET(ht->gids+hsh); \
                                        while (slot && (pgids[slot] != gi[i] || 
!is_##Type##_nil(vals[slot]))) { \
                                                hsh++; \
diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c
--- a/sql/storage/bat/bat_storage.c
+++ b/sql/storage/bat/bat_storage.c
@@ -2982,7 +2982,7 @@ double_elim_col(sql_trans *tr, sql_colum
                if (b && ATOMstorage(b->ttype) == TYPE_str) { /* check double 
elimination */
                        de = GDK_ELIMDOUBLES(b->tvheap);
                        if (de) {
-                               int bytes = b->tvheap->free - GDK_VAROFFSET;
+                               BUN bytes = b->tvheap->free - GDK_VAROFFSET;
                                if (bytes > 0)
                                        de = bytes/b->twidth;
                        }
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to