From 2c23fbee16d82b05c69588d83d52b17d107d8eb3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sun, 21 Aug 2011 11:45:57 +0400 Subject: Resolve "comparison of signed and unsigned values" compiler warnings. * allchblk.c (GC_allochblk_nth): Cast MAX_BLACK_LIST_ALLOC and HBLKSIZE to signed_word. * mallocx.c (GC_generic_malloc_many): Cast my_bytes_allocd to word. * mark.c (GC_do_local_mark): Cast the result of local_top minus local_mark_stack to word (since is non-negative). * misc.c (GC_base): Declare sz as unsigned word. * misc.c (GC_enable_incremental): Cast bytes_written to size_t in comparison to len. * obj_map.c (GC_initialize_offsets): Declare 'i' as unsigned. * os_dep.c (GC_or_pages): Ditto. * typd_mlc.c (GC_init_explicit_typing): Ditto. * ptr_chck.c (GC_is_visible): Cast the result of p minus base to word. * typd_mlc.c (GC_make_descriptor): Cast last_set_bit to word (since non-negative) when compared to BITMAP_BITS. --- obj_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'obj_map.c') diff --git a/obj_map.c b/obj_map.c index 082a0aa7..ed75ef12 100644 --- a/obj_map.c +++ b/obj_map.c @@ -78,7 +78,7 @@ GC_INNER void GC_register_displacement_inner(size_t offset) GC_INNER void GC_initialize_offsets(void) { - int i; + unsigned i; if (GC_all_interior_pointers) { for (i = 0; i < VALID_OFFSET_SZ; ++i) GC_valid_offsets[i] = TRUE; -- cgit v1.2.1