fix diagnostic when building unix port for tests

This commit is contained in:
Jeff Epler 2022-06-27 09:49:00 -05:00
parent cb331309c9
commit 91e15af84e
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -146,6 +146,8 @@ void gc_init(void *start, void *end) {
MP_STATE_MEM(gc_pool_end) = end;
#if MICROPY_ENABLE_FINALISER
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;
(void)gc_finaliser_table_byte_len; // avoid unused variable diagnostic if asserts are disabled
assert(MP_STATE_MEM(gc_pool_start) >= MP_STATE_MEM(gc_finaliser_table_start) + gc_finaliser_table_byte_len);
#endif