diff --git a/py/modbuiltins.c b/py/modbuiltins.c
index 05bdbfecac9c7432698b9f3bb88e3500a6a50ebe..859cb11116eca41ac272358fc4b5fa87516829ac 100644
--- a/py/modbuiltins.c
+++ b/py/modbuiltins.c
@@ -370,7 +370,7 @@ STATIC mp_obj_t mp_builtin_ord(mp_obj_t o_in) {
             "ord expects a character"));
     } else {
         nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
-            "ord() expected a character, but string of length %d found", len));
+            "ord() expected a character, but string of length %d found", (int)len));
     }
 }
 MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_ord_obj, mp_builtin_ord);
diff --git a/py/obj.c b/py/obj.c
index 65b447494a49a9cca2a88d8a7cda92babcd0d753..91dd4c09050091022b18cf97be3a50dbe844af89 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -342,7 +342,7 @@ void mp_obj_get_array_fixed_n(mp_obj_t o, mp_uint_t len, mp_obj_t **items) {
                 "tuple/list has wrong length"));
         } else {
             nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
-                "requested length %d but object has length %d", len, seq_len));
+                "requested length %d but object has length %d", (int)len, (int)seq_len));
         }
     }
 }
diff --git a/py/objclosure.c b/py/objclosure.c
index d556b3b8ae9251e797c93da93b3d9894e9f19c7e..4b37d2dd12470e24b05d3ef40febf29736143c25 100644
--- a/py/objclosure.c
+++ b/py/objclosure.c
@@ -65,7 +65,7 @@ STATIC void closure_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_
     mp_obj_closure_t *o = MP_OBJ_TO_PTR(o_in);
     mp_print_str(print, "<closure ");
     mp_obj_print_helper(print, o->fun, PRINT_REPR);
-    mp_printf(print, " at %p, n_closed=%u ", o, o->n_closed);
+    mp_printf(print, " at %p, n_closed=%u ", o, (int)o->n_closed);
     for (mp_uint_t i = 0; i < o->n_closed; i++) {
         if (o->closed[i] == MP_OBJ_NULL) {
             mp_print_str(print, "(nil)");
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c
index 62289f50f7b7a106dd76d82eadf7f9b855d14733..76dc9a1fc9855d7c94804e7ae43dfc076e1bf389 100644
--- a/py/objnamedtuple.c
+++ b/py/objnamedtuple.c
@@ -79,7 +79,7 @@ STATIC void namedtuple_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
 
 STATIC mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args) {
     const mp_obj_namedtuple_type_t *type = (const mp_obj_namedtuple_type_t*)type_in;
-    mp_uint_t num_fields = type->n_fields;
+    size_t num_fields = type->n_fields;
     if (n_args + n_kw != num_fields) {
         if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
             mp_arg_error_terse_mismatch();
diff --git a/py/runtime.c b/py/runtime.c
index e4a4d5b3f5fd6750d8fa98a36ded6385fd276e44..adbab579f0cdc1792c1a6f89bc58530520d3241b 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -788,7 +788,7 @@ too_short:
             "wrong number of values to unpack"));
     } else {
         nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
-            "need more than %d values to unpack", seq_len));
+            "need more than %d values to unpack", (int)seq_len));
     }
 too_long:
     if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
@@ -796,7 +796,7 @@ too_long:
             "wrong number of values to unpack"));
     } else {
         nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
-            "too many values to unpack (expected %d)", num));
+            "too many values to unpack (expected %d)", (int)num));
     }
 }
 
@@ -863,7 +863,7 @@ too_short:
             "wrong number of values to unpack"));
     } else {
         nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError,
-            "need more than %d values to unpack", seq_len));
+            "need more than %d values to unpack", (int)seq_len));
     }
 }