From 18a835e9b4019a1b141f481af902e172daceb8e9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 24 Jun 2025 10:47:21 +0200 Subject: [PATCH] examples/usercmodule: Cast arguments for printf. These locations were found using an experimental gcc plugin for `mp_printf` error checking. Signed-off-by: Jeff Epler --- examples/usercmodule/cexample/examplemodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/usercmodule/cexample/examplemodule.c b/examples/usercmodule/cexample/examplemodule.c index 83cc3b27c..a2b4d766f 100644 --- a/examples/usercmodule/cexample/examplemodule.c +++ b/examples/usercmodule/cexample/examplemodule.c @@ -86,12 +86,12 @@ static void example_AdvancedTimer_print(const mp_print_t *print, mp_obj_t self_i mp_uint_t elapsed = mp_obj_get_int(example_Timer_time(self_in)); // We'll make all representations print at least the class name. - mp_printf(print, "%q()", MP_QSTR_AdvancedTimer); + mp_printf(print, "%q()", (qstr)MP_QSTR_AdvancedTimer); // Decide what else to print based on print kind. if (kind == PRINT_STR) { // For __str__, let's attempt to make it more readable. - mp_printf(print, " # created %d seconds ago", elapsed / 1000); + mp_printf(print, " # created %d seconds ago", (int)(elapsed / 1000)); } }