summaryrefslogtreecommitdiffstatshomepage
path: root/lib/utils/pyexec.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-10-26 13:45:03 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-10-26 13:45:03 +0300
commit6832cbd69d04db1703b8b17939d8cd894aea4c68 (patch)
treef1463b6658bc3245aa477215a80f7b73ace67d18 /lib/utils/pyexec.c
parentc38ea32810f2b8b55c1585a3022902c359f84d6e (diff)
downloadmicropython-6832cbd69d04db1703b8b17939d8cd894aea4c68.tar.gz
micropython-6832cbd69d04db1703b8b17939d8cd894aea4c68.zip
lib/utils/pyexec: Fix compilation warning of type vs format mismatch.
This happens with some compilers on some architectures, which don't define size_t as unsigned int. MicroPython's printf() dooesn't support obscure format specifiers for size_t, so the obvious choice is to explicitly cast to unsigned, to match %u used in printf().
Diffstat (limited to 'lib/utils/pyexec.c')
-rw-r--r--lib/utils/pyexec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils/pyexec.c b/lib/utils/pyexec.c
index ed424a2f95..b398d72661 100644
--- a/lib/utils/pyexec.c
+++ b/lib/utils/pyexec.c
@@ -120,7 +120,9 @@ STATIC int parse_compile_execute(void *source, mp_parse_input_kind_t input_kind,
{
size_t n_pool, n_qstr, n_str_data_bytes, n_total_bytes;
qstr_pool_info(&n_pool, &n_qstr, &n_str_data_bytes, &n_total_bytes);
- printf("qstr:\n n_pool=" UINT_FMT "\n n_qstr=" UINT_FMT "\n n_str_data_bytes=" UINT_FMT "\n n_total_bytes=" UINT_FMT "\n", n_pool, n_qstr, n_str_data_bytes, n_total_bytes);
+ printf("qstr:\n n_pool=" UINT_FMT "\n n_qstr=" UINT_FMT "\n "
+ "n_str_data_bytes=" UINT_FMT "\n n_total_bytes=" UINT_FMT "\n",
+ (unsigned)n_pool, (unsigned)n_qstr, (unsigned)n_str_data_bytes, (unsigned)n_total_bytes);
}
#if MICROPY_ENABLE_GC