summaryrefslogtreecommitdiff
path: root/examples/usercmodule/cexample/examplemodule.c
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2025-06-24 10:47:21 +0200
committerDamien George <damien@micropython.org>2025-07-25 10:59:28 +1000
commit18a835e9b4019a1b141f481af902e172daceb8e9 (patch)
treef79ad1f40a03294f8849d25e37d9dc21da9d51b9 /examples/usercmodule/cexample/examplemodule.c
parent338ca3b68f3ca8b38838198e7cb147940192cca2 (diff)
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 <jepler@gmail.com>
Diffstat (limited to 'examples/usercmodule/cexample/examplemodule.c')
-rw-r--r--examples/usercmodule/cexample/examplemodule.c4
1 files 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));
}
}