From cb8e2f02ab34b49e5bd42012f3bc9adf61607b25 Mon Sep 17 00:00:00 2001 From: stijn Date: Wed, 27 Jan 2021 15:44:53 +0100 Subject: [PATCH] py/gc: Fix debug printing of pointer. When DEBUG_printf is the standard printf, compilers require the value for %p to be an actual pointer instead of an integer. --- py/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/gc.c b/py/gc.c index 767f1b81c4..41bbaa1b57 100644 --- a/py/gc.c +++ b/py/gc.c @@ -294,7 +294,7 @@ STATIC void gc_sweep(void) { } #endif free_tail = 1; - DEBUG_printf("gc_sweep(%p)\n", PTR_FROM_BLOCK(block)); + DEBUG_printf("gc_sweep(%p)\n", (void *)PTR_FROM_BLOCK(block)); #if MICROPY_PY_GC_COLLECT_RETVAL MP_STATE_MEM(gc_collected)++; #endif