From 87c8766806a3287dd99f31e913208fdf200017cc Mon Sep 17 00:00:00 2001 From: ivmai Date: Thu, 14 Jul 2011 13:43:13 +0000 Subject: 2011-07-14 Ivan Maidanski * new_hblk.c (GC_build_fl): Adjust "h" local variable cast type when setting obj_link (to prevent compiler warning); reformat the comment. * tests/test.c (reverse_test_inner): Use proper type when touching "b" and "c" local variables (to prevent compiler warning). --- new_hblk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'new_hblk.c') diff --git a/new_hblk.c b/new_hblk.c index 6e2dca56..1366b131 100644 --- a/new_hblk.c +++ b/new_hblk.c @@ -158,12 +158,10 @@ GC_INNER ptr_t GC_build_fl(struct hblk *h, size_t sz, GC_bool clear, } p -= sz; /* p now points to last object */ - /* - * put p (which is now head of list of objects in *h) as first - * pointer in the appropriate free list for this size. - */ - obj_link(h -> hb_body) = list; - return ((ptr_t)p); + /* Put p (which is now head of list of objects in *h) as first */ + /* pointer in the appropriate free list for this size. */ + *(ptr_t *)h = list; + return ((ptr_t)p); } /* -- cgit v1.2.1