diff options
| author | liruncong <[email protected]> | 2019-03-10 10:53:22 +0800 |
|---|---|---|
| committer | liruncong <[email protected]> | 2019-03-10 10:54:54 +0800 |
| commit | 39673cf4f6a09c37f0d3496c5ead1bc3c0cfec4e (patch) | |
| tree | bedd7bf082d7109e74312205a494e5ae4975b6a2 | |
| parent | 59d04452ce7baffde6269380a78e5d3c5a3b93e6 (diff) | |
[src]消除参数传递警告(warning: passing argument 1 of 'zoneindex' from incompatible pointer type [-Wincompatible-pointer-types])
| -rw-r--r-- | src/slab.c | 4 |
1 files 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) { |
