From 39673cf4f6a09c37f0d3496c5ead1bc3c0cfec4e Mon Sep 17 00:00:00 2001 From: liruncong Date: Sun, 10 Mar 2019 10:53:22 +0800 Subject: [PATCH] =?UTF-8?q?[src]=E6=B6=88=E9=99=A4=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E4=BC=A0=E9=80=92=E8=AD=A6=E5=91=8A(warning:=20passing=20argum?= =?UTF-8?q?ent=201=20of=20'zoneindex'=20from=20incompatible=20pointer=20ty?= =?UTF-8?q?pe=20[-Wincompatible-pointer-types])?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slab.c b/src/slab.c index bf26c84cca..f4806ddb60 100644 --- a/src/slab.c +++ b/src/slab.c @@ -398,10 +398,10 @@ void rt_system_heap_init(void *begin_addr, void *end_addr) * Calculate the zone index for the allocation request size and set the * allocation request size to that particular zone's chunk size. */ -rt_inline int zoneindex(rt_uint32_t *bytes) +rt_inline int zoneindex(rt_size_t *bytes) { /* unsigned for shift opt */ - rt_uint32_t n = (rt_uint32_t) * bytes; + rt_uint32_t n = (rt_uint32_t)(*bytes); if (n < 128) {