Skip to content

Commit 91e15af

Browse files
committed
fix diagnostic when building unix port for tests
1 parent cb33130 commit 91e15af

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py/gc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ void gc_init(void *start, void *end) {
146146
MP_STATE_MEM(gc_pool_end) = end;
147147

148148
#if MICROPY_ENABLE_FINALISER
149+
size_t gc_finaliser_table_byte_len = (MP_STATE_MEM(gc_alloc_table_byte_len) * BLOCKS_PER_ATB + BLOCKS_PER_FTB - 1) / BLOCKS_PER_FTB;
150+
(void)gc_finaliser_table_byte_len; // avoid unused variable diagnostic if asserts are disabled
149151
assert(MP_STATE_MEM(gc_pool_start) >= MP_STATE_MEM(gc_finaliser_table_start) + gc_finaliser_table_byte_len);
150152
#endif
151153

0 commit comments

Comments
 (0)