diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-08-04 09:58:04 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-08-05 08:27:34 +0300 |
commit | 2a6cee2a42c5a2fa69dc52b18b92420ee9bf61da (patch) | |
tree | ee7e33b581b308c3681dbbf985047a413920afd5 /checksums.c | |
parent | e717f1191ba099d46a4eb0c56954b1b2e5333d5b (diff) | |
download | bdwgc-2a6cee2a42c5a2fa69dc52b18b92420ee9bf61da.tar.gz |
Fix 'passing arg 1 of GC_apply_to_all_blocks from incompatible type' error
(fix of commit e717f1191)
Issue #460 (bdwgc).
* backgraph.c [MAKE_BACK_GRAPH] (per_object_helper): Add GC_CALLBACK
modifier; change 2nd argument type from word to GC_word.
* checksums.c [CHECKSUMS] (GC_add_block): Likewise.
* dbg_mlc.c [!SHORT_DBG_HDRS] (GC_check_heap_block): Likewise.
* mark.c (clear_marks_for_block): Likewise.
* misc.c (block_add_size): Likewise.
* reclaim.c (GC_reclaim_block, GC_print_block_descr,
GC_do_enumerate_reachable_objects): Likewise.
* checksums.c [CHECKSUMS] (GC_check_blocks): Remove unnecessary cast of
zero to word.
* include/gc/gc_mark.h (GC_apply_to_all_blocks): Add GC_ATTR_NONNULL(1).
Diffstat (limited to 'checksums.c')
-rw-r--r-- | checksums.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/checksums.c b/checksums.c index 95601854..f6188c75 100644 --- a/checksums.c +++ b/checksums.c @@ -114,7 +114,8 @@ STATIC void GC_update_check_page(struct hblk *h, int index) word GC_bytes_in_used_blocks = 0; -STATIC void GC_add_block(struct hblk *h, word dummy GC_ATTR_UNUSED) +STATIC void GC_CALLBACK GC_add_block(struct hblk *h, + GC_word dummy GC_ATTR_UNUSED) { hdr * hhdr = HDR(h); @@ -126,7 +127,7 @@ STATIC void GC_check_blocks(void) word bytes_in_free_blocks = GC_large_free_bytes; GC_bytes_in_used_blocks = 0; - GC_apply_to_all_blocks(GC_add_block, (word)0); + GC_apply_to_all_blocks(GC_add_block, 0); GC_COND_LOG_PRINTF("GC_bytes_in_used_blocks= %lu," " bytes_in_free_blocks= %lu, heapsize= %lu\n", (unsigned long)GC_bytes_in_used_blocks, |