From: Ivan Maidanski Date: Wed, 14 Sep 2011 18:02:00 +0000 (+0400) Subject: Resolve "comparison of signed and unsigned values" compiler warning. X-Git-Tag: gc7_3alpha2~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=735249e9bb2b3980e60f62b6fe26f8ad87a8eb51;p=gc Resolve "comparison of signed and unsigned values" compiler warning. * backgraph.c (per_object_helper): Cast "i" local variable to word (instead of "sz") in a comparison. --- diff --git a/backgraph.c b/backgraph.c index 04259f19..67e0b371 100644 --- a/backgraph.c +++ b/backgraph.c @@ -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)