summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Stedfast <jeff@xamarin.com>2013-08-13 13:12:59 -0400
committerIvan Maidanski <ivmai@mail.ru>2013-09-15 13:00:56 +0400
commit35df9441bbbd31ea837a82c1979fa06dd814aeb6 (patch)
tree53d64c9d44aaba3cb6229e39315c018cac444cfe
parent466c055ef0450aee0094b4ec40192e4428c4b37f (diff)
downloadbdwgc-35df9441bbbd31ea837a82c1979fa06dd814aeb6.tar.gz
Fixed some compiler warnings in libgc
-rw-r--r--alloc.c2
-rw-r--r--obj_map.c2
-rw-r--r--ptr_chck.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/alloc.c b/alloc.c
index 9ec69923..b6bc1832 100644
--- a/alloc.c
+++ b/alloc.c
@@ -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 =
diff --git a/obj_map.c b/obj_map.c
index 39993451..49f6add1 100644
--- a/obj_map.c
+++ b/obj_map.c
@@ -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. */
diff --git a/ptr_chck.c b/ptr_chck.c
index d83d730d..621a45f0 100644
--- a/ptr_chck.c
+++ b/ptr_chck.c
@@ -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);