diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2016-12-20 10:21:07 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2016-12-20 10:21:07 +0300 |
commit | 5732651cfc04c3a5dbe044bbf4869e6701c44b17 (patch) | |
tree | 66d79a3fa8d7fd33c94af19726fb8d6941237f32 /headers.c | |
parent | bfe8e64b1780a2c2420ad56f2afe2213547e1aa0 (diff) | |
download | bdwgc-5732651cfc04c3a5dbe044bbf4869e6701c44b17.tar.gz |
Fix (adjust) GC_scratch_alloc actual argument type
* dyn_load.c [IRIX5 || USE_PROC_FOR_LIBRARIES && !LINUX]
(GC_register_dynamic_libraries): Do not cast GC_scratch_alloc argument
to word type (it should be of size_t).
* headers.c (alloc_hdr, GC_init_headers, get_index): Likewise.
* os_dep.c [PROC_VDB] (GC_proc_buf_size): Change type from word to size_t.
* os_dep.c [PROC_VDB] (GC_read_dirty): Change type of new_size local
variable (which is passed to GC_scratch_alloc) from word to size_t.
Diffstat (limited to 'headers.c')
-rw-r--r-- | headers.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -170,7 +170,7 @@ static hdr * alloc_hdr(void) register hdr * result; if (hdr_free_list == 0) { - result = (hdr *) GC_scratch_alloc((word)(sizeof(hdr))); + result = (hdr *)GC_scratch_alloc(sizeof(hdr)); } else { result = hdr_free_list; hdr_free_list = (hdr *) (result -> hb_next); @@ -194,7 +194,7 @@ GC_INNER void GC_init_headers(void) { register unsigned i; - GC_all_nils = (bottom_index *)GC_scratch_alloc((word)sizeof(bottom_index)); + GC_all_nils = (bottom_index *)GC_scratch_alloc(sizeof(bottom_index)); if (GC_all_nils == NULL) { GC_err_printf("Insufficient memory for GC_all_nils\n"); EXIT(); @@ -224,14 +224,14 @@ static GC_bool get_index(word addr) if (p -> key == hi) return(TRUE); p = p -> hash_link; } - r = (bottom_index*)GC_scratch_alloc((word)(sizeof (bottom_index))); + r = (bottom_index *)GC_scratch_alloc(sizeof(bottom_index)); if (r == 0) return(FALSE); BZERO(r, sizeof (bottom_index)); r -> hash_link = old; GC_top_index[i] = r; # else if (GC_top_index[hi] != GC_all_nils) return(TRUE); - r = (bottom_index*)GC_scratch_alloc((word)(sizeof (bottom_index))); + r = (bottom_index *)GC_scratch_alloc(sizeof(bottom_index)); if (r == 0) return(FALSE); GC_top_index[hi] = r; BZERO(r, sizeof (bottom_index)); |