[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:
Tangyuxin
2022-09-20 10:31:11 -04:00
committed by GitHub
co-authored by Man, Jianting (Meco) <920369182@qq.com>
parent 746d7a01bd
commit a4829b1c00
22 changed files with 68 additions and 60 deletions
+2 -2
View File
@@ -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;
}