From 5732651cfc04c3a5dbe044bbf4869e6701c44b17 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 20 Dec 2016 10:21:07 +0300 Subject: 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. --- dyn_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dyn_load.c') diff --git a/dyn_load.c b/dyn_load.c index 1cfa7772..dbc145dc 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -819,7 +819,7 @@ GC_INNER void GC_register_dynamic_libraries(void) current_sz = needed_sz * 2 + 1; /* Expansion, plus room for 0 record */ addr_map = (prmap_t *)GC_scratch_alloc( - (word)current_sz * sizeof(prmap_t)); + (size_t)current_sz * sizeof(prmap_t)); if (addr_map == NULL) ABORT("Insufficient memory for address map"); } -- cgit v1.2.1