summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivmai <ivmai>2011-07-14 13:43:13 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:07:00 +0400
commit87c8766806a3287dd99f31e913208fdf200017cc (patch)
treefe68a0f206c404875ccff6892326a52acc12a97a
parent0e57ad67def39d7b672577499346103a4a19bdf8 (diff)
downloadbdwgc-87c8766806a3287dd99f31e913208fdf200017cc.tar.gz
2011-07-14 Ivan Maidanski <ivmai@mail.ru>
* 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).
-rw-r--r--ChangeLog8
-rw-r--r--new_hblk.c10
-rw-r--r--tests/test.c4
3 files changed, 14 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5776b929..362cd633 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-07-14 Ivan Maidanski <ivmai@mail.ru>
+
+ * 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 <ivmai@mail.ru>
* 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;
}