From 7457dbd640d599fb79886af46aa900bea0e124ff Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 27 May 2022 07:38:57 -0700 Subject: gc: bug: fix compilation if HAVE_VALGRIND. * gc.c (mark_obj_maybe): Avoid declaration after statement, which is enforced when configured in --maintainer mode. --- gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 0c727ed4..1f0d0e9f 100644 --- a/gc.c +++ b/gc.c @@ -517,11 +517,12 @@ static void mark_obj_maybe(val maybe_obj) VALGRIND_MAKE_MEM_DEFINED(&maybe_obj, sizeof maybe_obj); #endif if (in_heap(maybe_obj)) { + type_t t; #if HAVE_VALGRIND if (opt_vg_debug) VALGRIND_MAKE_MEM_DEFINED(maybe_obj, SIZEOF_PTR); #endif - type_t t = maybe_obj->t.type; + t = maybe_obj->t.type; if ((t & FREE) == 0) { mark_obj(maybe_obj); } else { -- cgit v1.2.3