summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dyn_load.c2
-rw-r--r--headers.c8
-rw-r--r--os_dep.c4
3 files changed, 7 insertions, 7 deletions
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");
}
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));
diff --git a/os_dep.c b/os_dep.c
index da00232b..6cbd3f17 100644
--- a/os_dep.c
+++ b/os_dep.c
@@ -3555,7 +3555,7 @@ GC_INNER void GC_read_dirty(GC_bool output_unneeded)
# include <sys/stat.h>
# define INITIAL_BUF_SZ 16384
- STATIC word GC_proc_buf_size = INITIAL_BUF_SZ;
+ STATIC size_t GC_proc_buf_size = INITIAL_BUF_SZ;
STATIC char *GC_proc_buf = NULL;
STATIC int GC_proc_fd = 0;
@@ -3596,7 +3596,7 @@ GC_INNER void GC_read_dirty(GC_bool output_unneeded)
BZERO(GC_grungy_pages, sizeof(GC_grungy_pages));
if (READ(GC_proc_fd, bufp, GC_proc_buf_size) <= 0) {
/* Retry with larger buffer. */
- word new_size = 2 * GC_proc_buf_size;
+ size_t new_size = 2 * GC_proc_buf_size;
char *new_buf;
WARN("/proc read failed: GC_proc_buf_size = %" WARN_PRIdPTR "\n",