]> granicus.if.org Git - gc/commitdiff
Resolve "comparison of signed and unsigned values" compiler warning.
authorIvan Maidanski <ivmai@mail.ru>
Wed, 14 Sep 2011 18:02:00 +0000 (22:02 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 14 Sep 2011 18:02:00 +0000 (22:02 +0400)
* backgraph.c (per_object_helper): Cast "i" local variable to word
(instead of "sz") in a comparison.

backgraph.c

index 04259f19b47c6139b9c50de50c3b41a10803eaf7..67e0b371e7dd72e30b40e379df46ab1b9b92e950 100644 (file)
@@ -275,7 +275,7 @@ static void per_object_helper(struct hblk *h, word fn)
   do {
     f((ptr_t)(h -> hb_body + i), sz, descr);
     i += (int)sz;
-  } while (i + (int)sz <= BYTES_TO_WORDS(HBLKSIZE));
+  } while ((word)i + sz <= BYTES_TO_WORDS(HBLKSIZE));
 }
 
 GC_INLINE void GC_apply_to_each_object(per_object_func f)