summaryrefslogtreecommitdiff
path: root/headers.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2016-12-20 10:21:07 +0300
committerIvan Maidanski <ivmai@mail.ru>2016-12-20 10:21:07 +0300
commit5732651cfc04c3a5dbe044bbf4869e6701c44b17 (patch)
tree66d79a3fa8d7fd33c94af19726fb8d6941237f32 /headers.c
parentbfe8e64b1780a2c2420ad56f2afe2213547e1aa0 (diff)
downloadbdwgc-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/headers.c b/headers.c
index c145e4a7..0c258de7 100644
--- a/headers.c
+++ b/headers.c
@@ -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));