From: ivmai Date: Thu, 14 Jul 2011 13:43:13 +0000 (+0000) Subject: 2011-07-14 Ivan Maidanski X-Git-Tag: gc7_3alpha2~411 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=87c8766806a3287dd99f31e913208fdf200017cc;p=gc 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). --- diff --git a/ChangeLog b/ChangeLog index 5776b929..362cd633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +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). + 2011-07-05 Ivan Maidanski * misc.c (GC_init): Use HOTTER_THAN (instead of STACK_GROWS_DOWN) 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); } /* diff --git a/tests/test.c b/tests/test.c index 809853c2..fa2eda17 100644 --- a/tests/test.c +++ b/tests/test.c @@ -638,8 +638,8 @@ void *GC_CALLBACK reverse_test_inner(void *data) # ifndef THREADS a = 0; # endif - *(volatile void **)&b = 0; - *(volatile void **)&c = 0; + *(sexpr volatile *)&b = 0; + *(sexpr volatile *)&c = 0; return 0; }