mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-24 22:04:54 +08:00
[fix] Fix simulator compilation warnings (#6438)
* [fix] Fix simulator compilation warnings * Update bsp/simulator/rtconfig_project.h Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
This commit is contained in:
co-authored by
Man, Jianting (Meco) <920369182@qq.com>
parent
746d7a01bd
commit
a4829b1c00
@@ -192,7 +192,7 @@ rt_size_t rt_ringbuffer_get(struct rt_ringbuffer *rb,
|
||||
|
||||
/* less data */
|
||||
if (size < length)
|
||||
length = size;
|
||||
length = (rt_uint16_t)size;
|
||||
|
||||
if (rb->buffer_size - rb->read_index > length)
|
||||
{
|
||||
@@ -248,7 +248,7 @@ rt_size_t rt_ringbuffer_peek(struct rt_ringbuffer *rb, rt_uint8_t **ptr)
|
||||
|
||||
if ((rt_size_t)(rb->buffer_size - rb->read_index) > size)
|
||||
{
|
||||
rb->read_index += size;
|
||||
rb->read_index += (rt_uint16_t)size;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user