Fixed some compiler warnings in libgc
authorJeffrey Stedfast <jeff@xamarin.com>
Tue, 13 Aug 2013 17:12:59 +0000 (13:12 -0400)
committerJeffrey Stedfast <jeff@xamarin.com>
Tue, 13 Aug 2013 17:12:59 +0000 (13:12 -0400)
libgc/alloc.c
libgc/obj_map.c
libgc/ptr_chck.c

index 9ec6992352ad893b381dff712b37791359a183e8..b6bc1832c994da99c04ecbaa475200159c9103f4 100644 (file)
@@ -969,7 +969,7 @@ word n;
       }
 #   endif
     expansion_slop = WORDS_TO_BYTES(min_words_allocd()) + 4*MAXHINCR*HBLKSIZE;
-    if (GC_last_heap_addr == 0 && !((word)space & SIGNB)
+    if ((GC_last_heap_addr == 0 && !((word)space & SIGNB))
         || (GC_last_heap_addr != 0 && GC_last_heap_addr < (ptr_t)space)) {
         /* Assume the heap is growing up */
         GC_greatest_plausible_heap_addr =
index 39993451cc7107651810adccfa5f73747edab341..49f6add1553dcf2ea94d829a3b54a6498202783f 100644 (file)
@@ -22,7 +22,7 @@
 # include "private/gc_priv.h"
 
 map_entry_type * GC_invalid_map = 0;
-static max_valid_offset = 0;
+static word max_valid_offset = 0;
 
 /* Invalidate the object map associated with a block.  Free blocks     */
 /* are identified by invalid maps.                                     */
index d83d730d3433f5f29b2da36e1c97013869b92394..621a45f0346fead0739260b7866053d199ef76ff 100644 (file)
@@ -165,7 +165,7 @@ void (*GC_is_valid_displacement_print_proc) GC_PROTO((GC_PTR)) =
     pdispl = HBLKDISPL(p);
     map_entry = MAP_ENTRY((hhdr -> hb_map), pdispl);
     if (map_entry == OBJ_INVALID
-       || sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz) {
+       || (sz > MAXOBJBYTES && (ptr_t)p >= (ptr_t)h + sz)) {
        goto fail;
     }
     return(p);