diff options
| author | Bernard Xiong <[email protected]> | 2019-06-19 15:33:27 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-19 15:33:27 +0800 |
| commit | d8702aa5685a1b91bac7f594322a434afc63b6c3 (patch) | |
| tree | 3d4ef748043d99e3bf4244e948e70fee0ef7996e /components/drivers/src/ringbuffer.c | |
| parent | efab8a25c3fcdc50d4518651a60b8b4a172e8c2f (diff) | |
| parent | d8eb0cfc1e119b81290a460883f427a38d572617 (diff) | |
Merge pull request #2793 from tyustli/cpp11_error
fix kernel and framework no cast type error
Diffstat (limited to 'components/drivers/src/ringbuffer.c')
| -rw-r--r-- | components/drivers/src/ringbuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/src/ringbuffer.c b/components/drivers/src/ringbuffer.c index 0acdbbd38c..c6a491a7cc 100644 --- a/components/drivers/src/ringbuffer.c +++ b/components/drivers/src/ringbuffer.c @@ -332,11 +332,11 @@ struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t size) size = RT_ALIGN_DOWN(size, RT_ALIGN_SIZE); - rb = rt_malloc(sizeof(struct rt_ringbuffer)); + rb = (struct rt_ringbuffer *)rt_malloc(sizeof(struct rt_ringbuffer)); if (rb == RT_NULL) goto exit; - pool = rt_malloc(size); + pool = (rt_uint8_t *)rt_malloc(size); if (pool == RT_NULL) { rt_free(rb); |
