rculfhash: Only pass integral types to atomic builtins
[urcu.git] / src / rculfhash.c
index 09cd2b79cd33aa91c75e6d3982aab7faf7a03137..a453326a4124f11ac06aeb14697214d99b3c020d 100644 (file)
@@ -1153,7 +1153,7 @@ int _cds_lfht_del(struct cds_lfht *ht, unsigned long size,
                struct cds_lfht_node *node)
 {
        struct cds_lfht_node *bucket, *next;
-       struct cds_lfht_node **node_next;
+       uintptr_t *node_next;
 
        if (!node)      /* Return -ENOENT if asked to delete NULL node */
                return -ENOENT;
@@ -1185,7 +1185,7 @@ int _cds_lfht_del(struct cds_lfht *ht, unsigned long size,
         * NOTE: The node_next variable is present to avoid breaking
         * strict-aliasing rules.
         */
-       node_next = &node->next;
+       node_next = (uintptr_t*)&node->next;
        uatomic_or_mo(node_next, REMOVED_FLAG, CMM_RELEASE);
 
        /* We performed the (logical) deletion. */
@@ -1426,7 +1426,7 @@ void remove_table_partition(struct cds_lfht *ht, unsigned long i,
        for (j = size + start; j < size + start + len; j++) {
                struct cds_lfht_node *fini_bucket = bucket_at(ht, j);
                struct cds_lfht_node *parent_bucket = bucket_at(ht, j - size);
-               struct cds_lfht_node **fini_bucket_next;
+               uintptr_t *fini_bucket_next;
 
                urcu_posix_assert(j >= size && j < (size << 1));
                dbg_printf("remove entry: order %lu index %lu hash %lu\n",
@@ -1436,7 +1436,7 @@ void remove_table_partition(struct cds_lfht *ht, unsigned long i,
                 * NOTE: The fini_bucket_next variable is present to
                 * avoid breaking strict-aliasing rules.
                 */
-               fini_bucket_next = &fini_bucket->next;
+               fini_bucket_next = (uintptr_t*)&fini_bucket->next;
                uatomic_or(fini_bucket_next, REMOVED_FLAG);
                _cds_lfht_gc_bucket(parent_bucket, fini_bucket);
        }
This page took 0.023112 seconds and 4 git commands to generate.